n=int(input())
a=list(map(int,input().split()))
a.sort()
b=-1
for i in range(1,n):
  if a[0]^a[i]in a[2:]:
    b=a.index(a[0]^a[i])
    break
if b==-1:
  print('No')
  exit()
c=[a[0],a[b]]
for i in range(n-2):
  c.append(c[-2]^c[-1])
if c[1]^c[-1]==c[0]:
  c.sort()
  if a==c:
    print('Yes')
    exit()
print('No')
