There are girls in a class, having roll numbers from to . Each of them has some points & a task. The task requires points to complete. A girl can use her own points & points from her previous roll girl to complete her task. ( Roll can use her points & points from roll girl.)
Now you have to check whether all the girls can complete their tasks or not.
The first line contains a single integer ( ) — the number of test cases.
The first line of each test case contains the single integer ( ) — the number of girls in a class.
Each of the next lines contains integers, and ( )
It's guaranteed that the sum of over all test cases doesn't exceed .
For each test case, print , if all the girls can complete their task, or otherwise.
Input | Output |
---|---|
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 |