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

