Attack Order

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

In a certain game, you control a board of nn minions numbered from 11 to nn. Each minion ii is characterized by an integer a_ia\_i, called its attack.

For the upcoming fight, you will arrange the minions in a line from left to right.

After that, some of the minions' attacks will get buffed. The ability of each minion ii reads "Before the fight, increase the attack of another random minion by b_ib\_i". Formally, for each ii, an arbitrary minion jij \ne i will be chosen and its attack a_ja\_j will be increased by b_ib\_i.

Note that the buff choices are independent and happen simultaneously. In particular, the attack of any minion can get buffed multiple times.

You want the attacks of the minions to be non-increasing from left to right after all the buffs happen. Determine whether it's possible for you to arrange the minions in a way that guarantees that, regardless of buff choices.

입력

Each test contains multiple test cases. The first line contains the number of test cases tt (1t10001 \le t \le 1000). Description of the test cases follows.

The first line of each test case contains a single integer nn (2n1002 \le n \le 100).

The ii-th of the next nn lines contains two integers a_ia\_i and b_ib\_i (0a_i,b_i1060 \le a\_i, b\_i \le 10^6).

출력

For each test case, print "Yes" if it is possible to arrange the minions in such a way that their attacks will be non-increasing regardless of buff choices, and "No" otherwise.

힌트

In the first example test case, the minions buff each other. The attacks of minions 11 and 22 during the fight will always be 2020 and 3535, respectively. You can arrange the minions in order 2,1\langle 2, 1 \rangle.

In the second example test case, only minion 22 buffs someone else. One valid ordering is 3,1,2\langle 3, 1, 2 \rangle. If minion 22 buffs minion 11, the attacks of the minions, from left to right, will be 10,10,7\langle 10, 10, 7 \rangle. If minion 22 buffs minion 33, the attacks of the minions will be 13,7,7\langle 13, 7, 7 \rangle. Both sequences are non-increasing.