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

def foo(x,y, numbers):
    answer = 0
    if len(numbers) == 0:
        answer = "Yes"
        return answer
    for i in numbers:
        if x ^ i == y:
            numbers.remove(x)
            numbers.remove(y)
            numbers.remove(i)
            foo(y,i,numbers)
        else:
            continue
    return answer
  

for i in numbers:
  for j in numbers:
    numbers_2 = numbers
    numbers_2.remove(i)
    numbers_2.remove(j)
    foo(i,j,numbers_2)