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

def XOR(x, y):
  u, i = 0, 0
  while x != 0 and y != 0:
    u += (((x % 2 + y % 2) % 2) * (2 ** i))
    x //= 2
    y //= 2
    i += 1
  return u
q = a[0]
for i in range(len(a)-1):
  q = XOR(q, a[i+1])
  
if q == 0:
  print('Yes')
else:
  print('No')