n = int(input())
num = list(map(int, input().split()))
l = num[0]
r = num[1]
sum_ = l ^ r
i = 0

while i < n:
  if sum_ in num:
    l, r = r, sum_
    sum_ = l ^ r
    num.remove(r)
    i += 1
  else:
    print("No")
    exit()
print("Yes")