Problems
Center of Masses
Center of Masses
Find the center of masses of a convex polygon, carved from wood.
Input
Consists of multiple test cases. The first line of each test case contains the number n (n ≤ 100) of points in the polygon. It is followed with n different pairs of integers (in no particular order), denoting the x and y coordinates of each point. The last polygon contains n < 3 points and should not be processed.
Output
For each polygon, print in a single line the coordinates x and y of its center of masses with three decimal digits.
Input example #1
4 0 1 1 1 0 0 1 0 3 1 2 1 0 0 0 7 -4 -4 -6 -3 -4 -10 -7 -12 -9 -8 -3 -6 -8 -3 1
Output example #1
0.500 0.500 0.667 0.667 -6.102 -7.089