import itertools

N = int(input())
Rakuda_data = list(itertools.permutations(input().split(' '),3))
flag =0

for n in Rakuda_data:
    if bin(int(n[0])^int(n[2])) == bin(int(n[1])):
        flag=1
        print('Yes')
        break
if flag==0:
    print('No')