Rotating Scoreboard

No attempts yetTime limit1sMemory limit128 MB

Problem

This year the ACM-ICPC World Finals will be held in a hall shaped like a simple polygon. The coaches and spectators are seated along the edges of the polygon. We want to place a rotating scoreboard somewhere in the hall so that every spectator sitting anywhere on the boundary of the hall can see the scoreboard, i.e. their line of sight is not blocked by a wall. If a spectator's line of sight is tangent to the polygon boundary (touching a vertex or an edge), they can still see the scoreboard. Treat each spectator's seat as a point on the boundary of the simple polygon, and treat the scoreboard as a single point as well. Given the corners of the hall (the vertices of the polygon), determine whether there is a location for the scoreboard (a point inside the polygon) from which it can be seen from every point on every edge of the polygon.

Input

The first number $T$ is the number of test cases. Each test case is given on a single line in the form $n\ x_1\ y_1\ x_2\ y_2\ \dots\ x_n\ y_n$, where $n$ ($3 \le n \le 100$) is the number of vertices of the polygon, and the integer pairs $x_i\ y_i$ list the vertices of the polygon in order (either clockwise or counterclockwise).

Output

Print $T$ lines, one per test case in the same order as the input. Each line contains YES if the scoreboard can be placed inside the hall subject to the conditions above, and NO otherwise.