#include <bits/stdc++.h>
using namespace std;
const int N = 1000000 + 5;
int info[N], n, val[N], tot;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &info[i]);
  }
  if (n == 3) {
    if (info[1] ^ info[2] == info[3]) {
      printf("Yes\n");
    } else {
      printf("No\n");
    }
    return 0;
  }
  sort(info + 1, info + n + 1);
  val[1] = info[1];
  tot = 1;
  for (int i = 2; i <= n; ++i) {
    if (info[i] != info[i - 1]) {
      tot++;
      val[tot] = info[i];
    }
  }
  if (tot > 3) {
    printf("No\n");
    return 0;
  }
  if (n % 3) {
    if (tot == 1 && val[1] == 0) {
      printf("Yes\n");
    } else {
      printf("No\n");
    }
    return 0;
  }
  if (val[1] ^ val[2] == val[3]) {
    printf("Yes\n");
  } else {
    printf("No\n");
  }
  return 0;
}
