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