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

for i in range(len(a)):
  ta = a.pop(i)
  sum_xor = 0
  for _a in a:
    sum_xor = sum_xor ^ _a
  if sum_xor==ta:
    flag = True
    break
  a.append(ta)

if flag:
  print('Yes')
else:
  print('No')