Dream

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 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 For Each test case, print ‘Yes’ if Tarzan’s Dream can come true and ‘No’ otherwise, in a new line. Sample Input 2 10 9846264761 Sample Output Yes No