#P7839. Game
Game
Game
Problem Description
Notice:Don't output extra spaces at the end of one line. Dodo bird and ddd are playing a stone game on a 2-d plane. There are points on the plane where they can put the stone. The rule is as follows:
- Before the game start, The stone is at the first point.
- Dodo and ddd move the stone in turn, Dodo moves first.
- In the first move, the player can move the stone to any point except the first point.
- Starting from the second move, assume the stone is currently at point , and the distance of the stone traveled in the last move is . The player can move the stone to a point if and only if and point has never been visited before.
- If a player cannot make a move, he loses the game. Please determine who will win the game if both player use the best strategy.
Input
The first line contains an integer , indicating the number of test cases. Each test case contains several lines. The first line contains an integer , indicating the number of points. Next lines, each line contains two integers , indicating the coordinate of the i-th point. It is guaranteed that there are at most 12 test cases with .
Output
For each test case, If Dodo can win the game, print "YES". Otherwise, print "NO".
Sample Input
2
5
1 1
0 0
2 0
0 2
2 2
4
1 1
0 0
0 2
2 2
Sample Output
NO
YES
Source
2020 Multi-University Training Contest 7