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