Independence Day - Main WAR

2.7

28 votes
Simple-math, Easy
Problem

We always knew they were coming back.


Species on Earth always had faced the problems came from outer space. We call them Alien , but for them they are travellers, who want to expand their territory.

When we had defeated them years back and sent them back to their World , still with a hope and with new advanced weapons they are heading towards our Earth.

And this threat s not with just one Nation but with our own Earth. So nations of all around our planet has joined to battle with Aliens once again

Strategy of Aliens to attack our planet this time is that their Battle-Ships will surround our planet from different directions and positions.

NASA has discovered that the formation of Aliens is in such a manner that all their Power-Energy-Sphere will consist to Centre Point of this formation. And we just need to destroy that Power-Energy-Sphere.

NASA and our planet needs your help to find out the Centre Point so that our future is safe. Please help us :)

Input : First line of input will contain an integer T number of test cases. Each of test case will have following lines of inputs. An integer N number of Battle-Ships. Next N lines will have two floating point values separated by single space denoting (x, y) position of Battle-Ships.

Output : For each test case print result in new line. Answer should be a floating point value with having two decimals after floating point.

NOTE : Print output in format (a , b) where a,b are position of Centre Point.

Constraints

1<= T <= 50

30<= N <= 10^4

-inf <= x, y <= +inf

Time Limit: 5
Memory Limit: 256
Source Limit:
Explanation

Note : For SampleInput N is taken 10 but constraints is different.

Explanation : When we draw these points on a drawing-board with origin(0, 0) and when we sketch for centre point it will be same as given in SampleOutput.

Editor Image

?