import itertools
import numpy as np
n = int(input())
numList = []
numList = list(map(int,input().split()))

result = 'No'
flag = False
count = 0

for wList in itertools.permutations(numList, n):
  p_list = np.array(list(itertools.permutations(wList, 3)))
  x_list = p_list[:,0:1] ^ p_list[:,2:]
  r_list = x_list - p_list[:,1:2]
  c_list = r_list[r_list > 0]
  count = len(c_list)

  if count == 0:
    flag = True
    break
    
if flag:
  result = 'Yes'

print(result)