N=int(input())
A=[ai for ai in map(int,input().split())]
CA={}
for a in A:
    if a in CA:
        CA[a]+=1
    else:
        CA[a]=1

for i in range(1,N):
    CA_Tmp={ai:0 for ai in CA.keys()}
    CA_Tmp[A[0]]=1
    CA_Tmp[A[i]]=1
    crnt=A[i]
    next=A[0]^A[i]
    Ans=True
    for j in range(2, N):
        if next in CA:
            CA_Tmp[next]+=1
            if CA_Tmp[next] > CA[next]:
                Ans=False
                break
            crnt,next=next,crnt^next
        else:
            Ans=False
            break
    if Ans==True:
        if next!=A[0]:
            Ans=False
        else:
            break

print("Yes" if Ans==True else "No")
