 Sara_Hasan Ada Lovelace National Gir...
Limits 2s, 512 MB

There are $N$ girls in a class, having roll numbers from $1$ to $N$. Each of them has some points $P_i$ & a task. The task requires $P_r$ points to complete. A girl can use her own points & points from her previous roll girl to complete her task. ( Roll $1$ can use her points & points from roll $N$ girl.)

Now you have to check whether all the girls can complete their tasks or not.

## Input

The first line contains a single integer $T$ ( $1 \leq T \leq 10^4$ ) — the number of test cases.

The first line of each test case contains the single integer $N$ ( $1 \leq N \leq 10^6$) — the number of girls in a class.

Each of the next $N$ lines contains $2$ integers, $P_r$ and $P_i$( $1 \leq P_r, P_i \leq 10^9, 1 \le i = r \le N$ )

It's guaranteed that the sum of $N$ over all test cases doesn't exceed $10^6$.

## Output

For each test case, print $YES$, if all the girls can complete their task, or $NO$ otherwise.

## Sample

InputOutput
5
4
7 3
5 7
2 6
3 3
4
7 3
5 3
2 6
3 7
2
1000000000 1000000000
1000000000 999999999
6
7 8
5 10
2 1
3 4
9 8
2 1
9
7 5
6 8
7 6
10 8
5 6
7 9
10 10
8 1
7 13

NO
YES
NO
YES
NO


### Submit 