import itertools
input = sys.stdin.readline
 
def main():
  n = int(input())
  numList = []
  numList = list(map(int,input().split()))

  result = 'No'
  flag = True
  count = 0

  for wList in set(itertools.permutations(numList, n)):
    for v in set(itertools.permutations(wList, 3)):
      xor = int(v[0]) ^ int(v[2])
      if xor != v[1]:
        flag = False
        break

    if flag:
      count +=1
      break

    flag = True

  if count > 0:
    result = 'Yes'

  print(result)
  
if __name__ == '__main__':
    main()