<?php
$n=trim(fgets(STDIN));
$a=explode(" ",trim(fgets(STDIN)));
$b=array_count_values($a);
if($n%3!=0){
  echo ($b[0]==$n)?"Yes":"No";
  exit;
}else{
  $c=array_count_values($b);
  if($c[$n/3]!=3){
    echo "No";
    exit;
  }
  $xor=0;
  foreach($b as $k=>$v){
    $xor^=$k;
  }
  echo ($xor==0)?"Yes":"No";
}
