Mr. Docriz has n different kinds of objects indexed by 1,2,…,n. An object of the i-th kind weighs i kilograms. For each i, Mr. Docriz has b_i objects of the i-th kind. Among those objects, there are a_i precious objects, and the remaining ones are common objects. Now, he wants to divide all his objects into some (one or more) disjoint sets. These sets have to satisfy the following conditions:
Please tell him whether it is possible.
For a set of size k, if we sort its elements by non-descending weight as c_1,c_2,…,c_k, the median weight of this set is defined as the weight of c_⌊(k+1)/2⌋.
The first line contains an integer T (1≤T≤1000), the number of test cases. Then T test cases follow.
The first line of each test case contains one integer n (1≤n≤106), specifying how many different kinds of objects Mr. Docriz has.
Then n lines follow. The i-th of these lines contains two integers a_i and b_i (0≤a_i≤b_i≤109), indicating that there are a_i precious objects of the i-th kind, and b_i objects of the i-th kind in total.
It is guaranteed that ∑n≤2⋅106.
For each test case, output "YES" if it is possible to achieve the goal, or "NO" otherwise.