Pro.ID22009 TitleCenter of symmetry Title链接http://10.20.2.8/oj/exercise/problem?problem_id=22009 AC1 Submit1 Ratio100.00% 时间&空间限制描述Given is a set of n points with integer coordinates. Your task is to decide whether the set has a center of symmetry. A set of points S has the 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. 输入The first line of input contains a number c giving the number of cases that follow. The first line of data for a single case contains number 1 ≤ n ≤ 10000. The subsequent n lines contain two integer numbers each which are the x and y coordinates of a point. Every point is unique and we have that -10000000 ≤ x, y ≤ 10000000. 输出Description Given is a set of n points with integer coordinates. Your task is to decide whether the set has a center of symmetry. A set of points S has the 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 The first line of input contains a number c giving the number of cases that follow. The first line of data for a single case contains number 1 ≤ n ≤ 10000. The subsequent n lines contain two integer numbers each which are the x and y coordinates of a point. Every point is unique and we have that -10000000 ≤ x, y ≤ 10000000. 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 Sample Output yes Source 样例输入1 样例输出yes 作者 |