#Lutece0110. Final Guessing

Final Guessing

Migrated from Lutece 110 Final Guessing

All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.

Description

The new season of UESTC programming contest is coming, before the contest, the lottery area in the BBS of stuhome give out a new lottery to forecast this year's most clever student in the UESTC!

As the odds is given, love8909 is 1:2,and stephydx is 1:3, which is to say if you buy one coin for love8909 and he win the contest, you will get two coins back, so that you will have earned one coin in this lottery!

lxhgww feels it is quite interesting, so now he comes to the stuhome BBS to buy the lottery, no one want to lose money, so dose him. Now, lxhgww wants to know whether there is a strategy to buy the lottery that he can always earn no matter who would be the winner of the contest!

Input

The first line of the input contains one integer TT, which indicates the number of test cases. For each test case, in the first line an integer NN meaning there are NN people join the contest (N105N\leq 10^5), then NN lines are given, each line contains two integers AA and BB, the numbers in ithi_{th} line is indicating the ithi_{th} odds of contestants is A : B.

Output

Output Yes if lxhgww have a way to buy the lottery so that he can always win. Otherwise, output No.

Samples

1
2
1 2
1 3
Yes

Note

If lxhgww buy 55 coins for the first person, and 44 coins for the second, so that he totally used 99 coins, and if the first person wins, he can get 1010 coins back, if the second person wins, he can get 1212 coins back. So that lxhgww can always win in this way.

Resources

The 7th UESTC Programming Contest Final