import itertools
N = int(input())
r = list(map(int,input().rstrip().split(' ')))
l = list(itertools.combinations(r,2))
f = 0
for u,v in l:
    if u ^ v in r:
       f += 1
if f >= N:
    print("Yes") 
else:
    print("No")