#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long modmypower(long long a, long long b) {
  if (b == 1) {
    return a;
  } else if (b % 2 == 0) {
    long long c = modmypower(a, b / 2);
    return (c * c) % MOD;
  } else {
    long long c = modmypower(a, (b - 1) / 2);
    return (((c * c) % MOD) * a) % MOD;
  }
}
long long modfactorial(long long x) {
  if (x <= 1)
    x = 1;
  else
    for (int i = x - 1; i > 0; i--) x = ((x * i) % MOD);
  return x;
}
long long modinv(long long x) { return modmypower(x, MOD - 2); }
int main() {
  int N;
  cin >> N;
  int a[100000];
  for (int i = 0; i < N; i++) cin >> a[i];
  sort(a, a + N);
  if (N % 3 == 0) {
    int x = a[0], y = a[N / 3], z = a[2 * N / 3];
    if (a[N / 3 - 1] == x && a[2 * N / 3 - 1] == y && a[N - 1] == z &&
        x ^ y == z && y ^ z == x && z ^ x == y) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  } else {
    if (a[N - 1] == 0) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
}
