7572: Game

内存限制:512 MB 时间限制:15 S 标准输入输出
题目类型:传统 评测方式:文本比较 上传者:
提交:20 通过:14

题目描述

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 n 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 x, and the distance of the stone traveled in the last move is d. The player can move the stone to a point y if and only if distance(x,y)>d and point y 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.

输入格式

The first line contains an integer T(1≤T≤100), indicating the number of test cases.

Each test case contains several lines. The first line contains an integer n(2≤n≤2000), indicating the number of points. Next n lines, each line contains two integers xi,yi(−109≤x,y≤109), indicating the coordinate of the i-th point.

It is guaranteed that there are at most 12 test cases with n>500.

输出格式

For each test case, If Dodo can win the game, print "YES". Otherwise, print "NO".

输入样例 复制

2
5
1 1
0 0
2 0
0 2
2 2
4
1 1
0 0
0 2
2 2

输出样例 复制

NO
YES

数据范围与提示