n = int(input())
num_dict = {}
for num in map(int, input().split()):
  if not num in list(num_dict.keys()):
    num_dict[num] = 0
  num_dict[num] += 1
l = list(num_dict.keys())[0]
r = list(num_dict.keys())[1]
num_dict[r] -= 1
sum_ = l ^ r
i = 1

while i < n:
  if sum_ in list(num_dict.keys()):
    l, r = r, sum_
    sum_ = l ^ r
    if num_dict[r] == 0:
      print("No")
      exit()
    else:
      num_dict[r] -= 1
    i += 1
  else:
    print("No")
    exit()
print("Yes")