Problem D : Dream

Time Limit: 3 seconds

Tarzan lives in a forest where there are n mysterious points. Tarzan is given the task of laying mysterious paths in the forest connecting mysterious points. Tarzan is blessed with the power to lay mysterious path between any two mysterious points. Tarzan is having a Dream. In his dream, he sees his n animal friends located in different mysterious points in the forest connected with non-negative number of mysterious paths.
Can Tarzan's Dream come true ?

Input Format

The first line in the input has an integer t, giving the number of test cases. 1< t <=100.
Each of the next t lines describes an test case.
Each line has n+1 integers The first integer gives the value of n. 0 <= n <= 1000 The next n integers give the number of mysterious paths, the mysterious points are connected to.

Output Format

For Each test case, print "Yes" if Tarzan's Dream can come true and "No" otherwise, in a new line.

Sample Input

2
1 0
9 8 4 6 2 6 4 7 6 1

Sample Output

Yes
No


Problem Setters: Vijay S , Shankara Raman S
Written for Carte Blanche' 08