import sys

N = int(input())
l = list(map(int, input().split()))
a = 0
for i in range(1, N):
  if l[0] ^ l[i] in l:
    a = l[0] ^ l[i]
    b = l[i]
    c = l[0]
    l.pop(0)
    l.remove(b)
    l.remove(a)
    break
if a == 0:
  print('No')
else:
  for i in range(3, N):
    if b ^ a in l:
      a, b = b ^ a, a
      l.remove(a)
    else:
      print('No')
      sys.exit()
  if a ^ b == c:
    print('Yes')
  else:
    print('No')