N = int(input())

a = sorted([int(x) for x in input().split()],reverse=True)

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') 