n=int(input())
a=[int(x) for x in input().split()]
f=0
a.sort()
a=list(set(a))
for i in range(len(a)):
  if(i==0):
    if(a[len(a)-1]^a[i+1]!=a[i]):
      f=1
      break
  else:
      if(a[(i+1)%len(a)]^a[i-1]!=a[i]):
        f=1
        break
  
if(f==0):
  print('Yes')
else:
  print('No')