N = int(input())
Rakuda_data =  input().split(' ')
flag = 0

for n in range(0, N-1):
    for i in range(0, N-1):
        for j in range(0, N-1):
            Flontstr = int(Rakuda_data[n])
            binstr = int(Rakuda_data[i])
            Afterstr = int(Rakuda_data[j])
            # XOR回路
            if bin(Flontstr ^ Afterstr) == bin(binstr):
                flag=1

if flag==0:
    print('No')
else:
    print('Yes')
        
        



