Given an array A. Is there any subset of array A in which if we do AND of all elements of that subset then output should be in power of two (for example : 1,2,4,8,16 and so on ).    

Input: 
First line contains number of test cases T. Each test first line contains N size of array A and next line contains N space separated integers.  

Output: 
For each test case print YES if there is any subset of array A in which if we do AND of all elements of that subset then output should be in power of two else print NO.  

Constraints: 
1 ≤ T ≤ 1000 
1 ≤ N ≤ 200 
0 ≤ Ai ≤ 10^9

SAMPLE INPUT
2
3
1 2 3
2
10 20SAMPLE OUTPUT
YES
NO
import math
T=int(raw_input())
while T>0:
    l=int(raw_input())
    n=list(raw_input().split())
    flag=0
    for i in xrange(0,l):    
        for j in xrange(i,l):
            pro=int(n[i])
            for m in xrange(j,l):
                pro=pro&int(n[m])
                if pro and (pro & (pro - 1))==0:
                    print "YES"
                    flag = 1
                    break;
                elif pro==0:
                    break;
            if flag:
                break;
        if flag:
            break;

    if flag == 0:
        print "NO"
    T=T-1