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
t=int(raw_input())
for i in range(t):
	n=int(raw_input())
	if n==1:
		single=int(raw_input())
		if ((single) & (single-1)==0) and single!=0:
			print "YES"
		else:
			print "NO"
	else:
		l=list()
		done=0
		inpStr=raw_input()
		l=inpStr.split()
		for j in range(32):
			temp=1<<j
			currentAnd=None
			for k in range(n):
				elem=int(l[k])
				if temp & elem==temp:
					if currentAnd is None:
						currentAnd = elem
					else:
						currentAnd = currentAnd & elem
			if currentAnd==temp:
				done=1
				break
		if done==0:
			print "NO"
		else:
			print "YES"