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