#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 nn 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 xx, and the distance of the stone traveled in the last move is dd. The player can move the stone to a point yy if and only if distance(x,y)>d\text{distance(x,y)} > d and point yy 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 T(1T100)T(1 \leq T \leq 100), indicating the number of test cases. Each test case contains several lines. The first line contains an integer n(2n2000)n(2 \leq n \leq 2000), indicating the number of points. Next nn lines, each line contains two integers xi,yi(109x,y109)x_i, y_i(-10^9 \leq x, y \leq 10^9), indicating the coordinate of the i-th point. It is guaranteed that there are at most 12 test cases with n>500n > 500.

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