Symmetry

Given up to 100000 planar points per test case, decide whether any line reflects the set onto itself.

Medium7GeometryHash mapSortingNo attempts yetTime limit2sMemory limit256 MB

Problem

Given a point pp and a line LL in the plane, the reflection of pp across LL is the point pp' such that the segment pppp' is perpendicular to LL and its midpoint lies on LL. If pp lies on LL, then p=pp' = p.

For a set of points in the plane, an axis of symmetry is a line such that the reflection of every point of the set across that line is again a point of the set. Given a set of points, decide whether at least one axis of symmetry exists.

Input

The first line contains the number of test cases KK (1K101 \le K \le 10).

The first line of each test case contains the number of points NN (1N1000001 \le N \le 100000). Each of the next NN lines contains the coordinates XX and YY of one point, separated by a single space (10000X,Y10000-10000 \le X, Y \le 10000). Each coordinate has at most 66 digits after the decimal point. No two points of one test case have the same location. The sum of NN over all test cases is at most 200000200000.

Because the coordinates are real numbers, the input satisfies the following. If an axis of symmetry exists, the reflection of every point coincides exactly with a point of the set. If no axis of symmetry exists, then for every line LL there is at least one point whose reflection across LL is farther than 10610^{-6} from every point of the set.

Output

For each test case, print YES on its own line if the set has at least one axis of symmetry, and NO otherwise.