n = int(input())
num = list(map(int, input().split()))
l = num[0]
r = num[1]
sum_ = l ^ r
i = 0
 
while i < n:
  l, r = r, sum_
  sum_ = l ^ r
  try:
    num.remove(sum_)
  except:
    print("No")
    exit()
  else:
    i += 1
print("Yes")