PCPC12A - Game

Fegla and Mamdouh are playing a new game. Each one of them stands on a point in X-Y plane. Fegla is standing on the point (X1, Y1) and Mamdouh is standing on point (X2, Y2). The aim of the game is to calculate the midpoint between them quickly, the one who calculates this point faster is the winner. Fegla is a very good mathematician and every time he calculates this point quickly and wins the game. Mamdouh is now upset of that and he decided to cheat (Don't do like him!). He decided to make a program to calculate this midpoint faster than Fegla. Your task is to help him in doing that.

Input

The first line contains one Integer N which is the number of games between Fegla and Mamdouh. Each line contains four integers X1, Y1, X2 and Y2 as described above.

Output

Print N lines each line contains two numbers which are the coordinates of the midpoint between Fegla and Mamdouh. It is guaranteed that the midpoint will be on a lattice point.

Example

Input:
2
1 2 3 4
2 2 2 2

Output:
2 3
2 2

Added by:abdelkarim
Date:2012-12-28
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:The First Palestinian Collegiate Programming Contest

hide comments
2014-04-16 22:08:45 AVOID
easy one but average for beginners..!!!
2014-04-16 22:08:45 abdelkarim
done :) .
2014-04-16 22:08:45 Ranker
Tutorial! Very easy!
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.