n = int(input())
figure = list(map(int, input().split()))
figure1 = []
p=0
for j in range(1,n):
  figure1.append(figure[0]^figure[j])
for k in range(n-1):
  if figure1[0]==figure[k]:
    print("Yes")
    #number1 = figure[0]
    #number2 = figure[1]
    #number3 = figure[k]
    p+=1
    break
if p==0:
  print("No")

