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

import sys
# import itertools
import bisect
import copy

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

a = sorted(map(int, sys.stdin.readline().rstrip().split()))

def index(a, x):
    'Locate the leftmost value exactly equal to x'
    i = bisect.bisect_left(a, x)
    if i != len(a) and a[i] == x:
        return i
    raise ValueError


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

  # print(j)
  tmp = copy.copy(a)

  # x, yを決めるとzが決まると同値なので
  x = a[0]
  y = a[j]
  
  del tmp[index(tmp, x)]
  del tmp[index(tmp, y)]

  next_flg = True
  while len(tmp) > 0:
    try:
      i = index(tmp, x^y)
    except ValueError:
      next_flg = False
      break
    
    # tmpからあたりをけずって続き
    del tmp[i]
    x, y = (y, x^y)

  
  if next_flg:
    print("Yes")
    quit()
  

print("No")
