def sumNum2(num1,num2):
  num3=[0]*14
  count =14
  for i in range(14):
    if num1[i] == num2[i]:
      num3[i]=0
    else:
      num3[i]=1
  return num3

def loopCheck(start,before,now,remaining):
  if len(remaining) ==1:
      print('test1')
      num2 = sumNum2(start,before)
      if now == num2:
        return true
      else:
        return false
  else:
    for i in range(len(remaining)):
      if before == -1:
        for j in range(len(remaining)):
          if j > i:
            num2 = sumNum2(remaining[i],remaining[j])
            if now == num2:
              if len(remaining) ==2:
                return True
              else:
                remaining2 = remaining
                remaining2.remove(remaining[i])
                loopCheck(start,now,remaining[i],remaining2)
          if i == remaining[-1]:
            if start == now:
              return false
      
      else:
        num2 = sumNum2(remaining[i],before)
        if now == num2:
          remaining2 = remaining
          remaining2.remove(remaining[i])
          loopCheck(start,now,remaining[i],remaining2)

def convert(number):
  num2=[0]*14
  count =14
  for i in range(15):
    count2 = count - i
    checknum = 2 ** count2
    if number >= checknum:
      num2[count2] = 1
      number = number -checknum
  return num2



if __name__ == '__main__':
  n = int(input())
  a = [int(i) for i in input().split()] 
  num2List = []
  for i in range(n):
    num2 = convert(a[i])
    num2List.append(num2)
  now = num2List[0]
  num2List.remove(num2List[0])
  if loopCheck(now,-1,now,num2List):
    print('Yes')
  else:
    print('No')