#Lutece0143. Centre of symmetry
Centre of symmetry
Migrated from Lutece 143 Centre of symmetry
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
If we are given a point and the centre of symmetry, we can get the symmetric point easily, but now, if I give you original points and their symmetric point, can you find the centre of symmetry?
Input
The first line contains a number denotes the number of test cases.
For each test case,
In the first line, you will get an integer () indicate there are pairs of points.
In the following lines, each contain a pair of real numbers, which describes the coordinates of the points.All the coordinates are in the range of .
A point isn't necessarily adjacent to its symmetric point.
Output
For each test case, you should output a pair of real number, describes the coordinate of the centre of symmetry. Both the number should round to digital. You may assume the centre of symmetry is always existed.
Samples
2
1
0 0
1 1
2
0 0
1 1
2 0
1 -1
0.500 0.500
1.000 0.000
Resources
Sichuan State Programming Contest 2008