n = int(input())
figure = list(map(int, input().split()))
p=0
for i in range(1):
  for j in range(i+1,n-1):
    now = figure[i]^figure[j]
    for k in range(j+1,n):
      if now==figure[k]:
        print("Yes")
        p+=1
        break
    else: 
      continue
    break
  else:
    continue
  break
if p==0:
  print("No")

