N = int(input())

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

if min(a) == 0 or max(a) == 10**9:
  print('No')
  exit()

for i in range(N):
    for j in range(i + 1, N):
      if a[i]^a[j] not in a:
        print('No')
        exit()
        
print('Yes') 
