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())
for Ai in CA_KEYS:
    Tmp=[]
    crnt=A[0]
    Tmp.append(A[0])
    next=Ai
#    CA_Tmp[crnt]=1
#    print(crnt, end=" ")
    Ans=True
    for j in range(1, N):
#        print(next,end=" ")
        if next in CA_KEYS:
            Tmp.append(next)
            crnt,next=next,crnt^next
        else:
            Ans=False
            break
    if Ans==True:
        if next!=A[0]:
#            print("No!",next,"!=",A[0])
            Ans=False
        else:
            Count_Tmp=col.Counter(Tmp)
            for t in Count_Tmp:
                if CA[t]!=Count_Tmp[t]:
                    Ans=False
                    break
            break

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