n=int(input())
a=list(map(int,input().split()))
l=[]
l.append(a[0])
for i in range(1,n):
    if a[i]^a[0] in a:
        x=a[i]^a[0]
        l.append(a[i])
        l.append(x)
        a.remove(a[i])
        a.remove(x)
        break
if n==3:
    if len(l)==3:
        print("Yes")
    else:
        print("No")
else:
    if len(l)!=3:
        print("No")
        exit()
    for i in range(3,n):
        if l[i-2]^l[i-1] in a:
            x=l[i-2]^l[i-1]
            l.append(x)
            a.remove(x)
        else:
            print("No")
            exit()
    if len(l)==n and l[0]^l[1]==l[-1]:
        print("Yes")
    else:
        print("No")
