PRI4: Spitting // Intermediate

 

In the San Diego zoo there is an enclosure with camels. It is known that camels like to spit. Ivy watched these interesting animals for the whole day and registered in her notepad where each animal spat. Now she wants to know if there are two camels that spat at each other in the zoo. Help her to solve this task.

The trajectory of a camel's spit is an arc, i.e. if the camel in position spits meters right, he can hit only the camel in position , if such a camel exists.

Input Format

The first line contains the number of test cases, .

In each test case:

The first line contains integer () — the number of camels in the zoo. Each of the following lines contains two integers and (, ) — records in Ivy's notepad. is the position of the camel, and is a distance at which the camel spat. Positive values of correspond to the rightward spits, and negative values correspond to leftward spits. No two camels may stand in the same position.

Sample Input

2
2
0 1
1 -1
3
0 1
1 1
2 -2

Output Format

For each test case, print out YES, if two camels did spit at each other, or NO, if two camels did not spit at each other.

Sample Output

YES
NO

Show Hints


You must be logged in to submit a solution.