Time Limit: 3000 MS Memory Limit: 65536 K
If you are given degrees of all vertices in the graph, whether such graph exists.
There will be at most one edge between each pair of vertices.
The first line of the input will be a integer to represent the number of test cases.
For each test case there is two lines.
The first line contains only one integer, the numble of the vertices N.
The second line contains N integers, the i-th integer represent the degree of the i-th vertice.
( 1 <= N <= 1000 , 0 <= the degree <= 1000 )
There is a blank line before each test case.
For each test case output the answer on a single line.
If there exist such graph output "YES".
Otherwise, output "NO".
2 2 2
1 1 2
1 2 3
1 2 3 5