import sys

N = int(input())
numbers = list(map(int, input().split())) 
numbers_2 = numbers
 
def foo(x,y, numbers):
    if len(numbers) == 0:
        print("Yes")
        sys.exit()
    for i in numbers:
        if x ^ i == y:
            numbers.remove(x)
            numbers.remove(y)
            numbers.remove(i)
            foo(y,i,numbers)
        else:
            continue
    print("No")
    sys.exit()
    
  
 
for i in numbers_2:
    for j in numbers_2:
        if not numbers_2.index(i) == numbers_2.index(j):
            foo(i,j,numbers_2)