N=int(input())
a=list(map(int,input().split()))

d={}
for A in a:
    if A in d:
        d[A]+=1
    else:
        d[A]=1
ans="Yes"
b=[a[0],a[1]]
for i in range(1,N):
    if i==N-1:
        t=b[-1]^b[-2]
        if t!=b[0]:
            ans="No"
        break
    t=b[i-1]^b[i]
    if t in d:
        b.append(t)
        d[t]-=1
        if d[t]==0:
            del d[t]
    else:
        ans="No"
        break

print(ans)