import itertools
n=int(input())
a=list(map(int,input().split()))
b=list(itertools.combinations(a,2))
for i in range(len(b)):
    if b[i][0]^b[i][1] not in a:
        print("No")
    else:
      print("Yes")