from copy import copy

n=int(input())
s=list(map(int,input().split()))
a=bin(s[0]^s[1])

ans0=s[0]
ans1=s[0]
del s[0]
i=0
j=0
p=0
while i<len(s):
    if p==0:
        ans2=s[i]

    while j<len(s):
        if i!=j:
            #print(s)
            if s!=[]:
                if bin(ans1^ans2)==bin(s[j]):
                    ans1=ans2
                    ans2=s[j]
                    #print(ans1,ans2)
                    del s[j]
                    if p==0:
                        del s[i]
                        p=1
        j+=1
    i+=1
    j=0


if s==[]:
    print("yes")
else:
    print("no")