import itertools
n=int(input())
l=list(map(int,input().split()))
if n!=3:print("No")
else:
  flag=0
  for i in itertools.permutations(s):
    if i[0]^i[2]==i[1] and i[1]^i[2]==i[0] and i[0]^i[1]==i[2]:flag+=1
  if flag!=0:print("Yes")
  else:print("No")
