import copy
import numpy
import sys

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

count=0

for i in range(N-1):
    first = List[i]
    a = copy.deepcopy(List)
    
    for j in range(i+1,N-1):
        acopy = copy.deepcopy(List)
        second = a[j]
        acopy.remove(second)
        
        for k in (i+j+1,N-1):

            xor = bin(first ^ second)
            check = int(xor,2)

            if (check in acopy):
                first = a[k]
                second = check
                acopy.remove(second)

            else:
                continue

            if (k == (N-1)):
                count = 1
                break
    
        if(count == 1):
            print("Yes")
            sys.exit()

print("No")
