#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import sys
# import itertools
# import bisect
import copy
import collections

N = int(sys.stdin.readline().rstrip())

a = [int(x) for x in sys.stdin.readline().rstrip().split()]

c_ = collections.Counter(a)


keys = list(c_.keys())


for j in range(len(keys)):
  if j == 0:
    continue

  # print(j)
  c = copy.copy(c_)

  # x, yを決めるとzが決まると同値なので
  x = keys[0]
  y = keys[j]
  
  c[x] -= 1
  c[y] -= 1
  
  next_flg = True
  for _ in range(N-2):
    z = x^y

    if c[z] <= 0:
      next_flg = False
      break
    
    c[z] -= 1
    x, y = (y, z)


  if next_flg:
    # 最後の1回
    if x^y == keys[0]:
      print("Yes")
      quit()

print("No")
