import collections as col
N=int(input())
A=[ai for ai in map(int,input().split())]
CA=col.Counter(A)
CA_KEYS=sorted(CA.keys())
#print(CA_KEYS)
for Ai in CA_KEYS:
    CA_Tmp={ai:0 for ai in CA_KEYS}
#    print()
    crnt=A[0]
    next=Ai
    CA_Tmp[crnt]=1
#    print(crnt, end=" ")
    if CA_Tmp[next] > CA[next]:
        continue
    Ans=True
    for j in range(1, N):
#        print(next,end=" ")
        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]:
#            print("No!",next,"!=",A[0])
            Ans=False
        else:
            break


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