import sequtils, strutils, tables

let
  n = stdin.readline.parseInt
  bs = stdin.readline.split.map(parseInt)
var
  counter = initCountTable[int]()

for b in bs:
  counter.inc(b)

var ok = true

block check:
  if len(counter) != 3:
    ok = false
    break check
  var tmp = 0
  for k,v in counter:
    tmp = tmp xor k
    if v != n div 3:
      ok = false
      break check
  if tmp != 0:
    ok = false
    break check

if ok:
  echo "Yes"
else:
  echo "No"
