n = int(input())
A = list(map(int, input().split()))
A.sort()
flag = True

for i in range(1,n):
  B = [A[0]]
  B.append(A[i])
  for j in range(2,n):
    c = B[j-2]^B[j-1]
    if B.count(c) == 0 and A.count(c) != 0:
      B.append(c)
    else:
      break
  if len(B) == n and B[0] == B[-1]^B[-2]:
    print('Yes')
    flag = False
    break
if flag:
  print('No')