N = int(input())

a = [int(x) for x in input().split()]

b = []
for i in range(N):
    for j in range(i + 1, N):
        b.append(int(bin(a[i]^a[j]),0))
        
if set(a) == set(b):
  print('Yes')
else:
  print('No')