import itertools

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

plus_set = set([ int(bin(c[0]^c[1]), 0) for c in (itertools.combinations(a,2))])
if set(a) == plus_set:
    print('Yes')
else:
    print('No')