b604: Center of Symmetry
Tags :
Accepted rate : 161人/180人 ( 89% ) [非即時]

Content

Given a set of n points in a plane with integer coordinates (xi, yi), i = 1, 2, . . . , n. Your task is to decide whether the set of points has a center of symmetry or not.

A set of points S has a center of symmetry if there exists a point s (not necessarily in S) such that for every point p in S there exists a point q in S such that p - s = s - q.

Input

For each case, the first line contains a number n, 1 <= n <= 10000. The subsequent n

lines contain two integers, which are the x and y coordinates of the point. Every point is unique and -10000000 <= x, y <= 10000000. A line with 0 (n = 0) signifies the end of input. A figure shown below is the sample input.

Output

For each set of input data print "yes" if the set of points has a center of symmetry and "no" otherwise.

Sample Input #1
8
1 10
3 6
6 8
6 2
3 -4
1 0
-2 -2
-2 4
0
Sample Output #1
yes


Hint ：
Tags:

[管理者：
(囧rz)
]

 ID User Problem Subject Hit Post Date 26106 (06) b604 27 2021-07-16 20:06 19210 (二信阿資) b604 523 2019-09-15 12:05 18416 (☆♬○♩程式家小崴●♪✧♩) b604 601 2019-07-11 16:10