n = int(input())
l = sorted(list(map(int,input().split())))
for i in range(n-2):
  a,b,c = l[i:3+i]
  if a^c ==b:
    continue
  else:
    print("No")
    exit()
else:
  if l[-2]^l[0]==l[-1] and l[-1]^l[1]==l[0]:
    print("Yes")
  else:
    print("No")