N=int(input())
l=list(map(int,input().split()))
l2=[0]*30
for i in l:
   tmp=bin(i).zfill(30)
   for j in range(30):
      if tmp[j]=="1":
         l2[j]=l2[j]^int(tmp[j])
if len(set(l2))==1:
   print("Yes")
else:
   print("No")