n = int(input())
li = list(map(int,input().split()))
a = li[0]
del li[0]
def f(num1,num2,l):
  if l == []:
    return True
  else:
    if num1^num2 in l:
      return f(num2,num1^num2,l[1:])
    else:
      return False
for i in li:
  if f(a,i,li[1:]):
    print("Yes")
    exit()
  else:continue
print("No")