Center of gravity
Medium
Execution time limit is 1 second
Runtime memory usage limit is 122.174 megabytes
Given the coordinates of the polygon vertices, find the coordinates of its center of gravity. The sides of the polygon are not in contact (with the exception of the neighboring - at the vertices) and do not intersect. The area of a polygon is not zero.
Input
The first line contains the number of vetices n (3 ≤ n ≤ 10^5
). The following n lines contain the pairs of numbers - the points coordinates that do not exceed 20000 by absolute value. If you connect the vertices in the given manner, and join the first and last point, you'll obtain the polygon.
Output
Print two numbers with two digits after the decimal point - the coordinates of the center of gravity.
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 470
Acceptance rate 14%