n = int(input())
a = [int(s) for s in input().split(" ")]
a_set = set(a)

ans = False
for i in range(n):
  for j in range(i, n):
    if a[i] ^ a[j] in a_set:
      ans = True
      break
  if ans:
    break

print("Yes" if ans else "No")