# coding: utf-8
# Your code here!

N=int(input())

l=list(map(int,input().split()))
l.sort()

init=l.pop(-1)

left=init
center=0
judge=False

ans=[left]

def find(left):
    if len(l)<2:
        if len(l)==1:
            ans.append(l.pop(0))
        else:
            pass
        
    else:
        right=l.pop(-1)
        for i in range(len(l)):
            if l[i]==left^right:
                center=l.pop(i)
                ans.append(center)
                ans.append(right)
                find(right)
            else:
                break
            
find(left)

if len(ans)==N:
    if ans[0]==ans[1]^ans[-1]:
        print("Yes")
else:
    print("No")











