Problem Description
The sky was brushed clean bythe wind andthe stars were cold inablack sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon inthe sky if we connect them properly. You want to record these moments by your smart camera. Of course, you cannot stay awake all night for capturing. So you decide towritea program running onthesmartcameratocheckwhetherthestarscanformaregularpolygonandcapturethesemomentsautomatically.
Formally, a regular polygon is a convex polygon whose angles are all equal and all its sides have the same length. The area ofa regular polygon must be nonzero. We say the stars can form a regular polygon if they are exactly the vertices of some regular polygon. To simplify the problem, we project the sky toatwo-dimensional plane here, and you just need to check whether the stars can form a regular polygon in this plane.
Input
The firstlinecontainsainteger T indicating the total numberof test cases. Each test casebeginswithaninteger n, denoting thenumberof stars inthe sky. Following n lines, eachcontains2 integers xi,yi, describe the coordinates of n stars.
1≤T≤3003≤n≤100
−10000≤xi,yi≤10000
All coordinates are distinct.
Output
For each test case, please output "`YES`"ifthe stars can form a regular polygon. Otherwise, output "`NO`" (both without quotes).
Sample Input
3300111040001101150001022220
Sample Output
NO
YES
NO
Problem DescriptionThe sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form a regular polygon in the sky if