#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ppp = pair<pair<int, int>, pair<int, int>>;
const int MAX = 510000;
const long long mod = 917120411LL;
long long fac[MAX], finv[MAX], inv[MAX];
void COMinit() {
  fac[0] = fac[1] = 1;
  finv[0] = finv[1] = 1;
  inv[1] = 1;
  for (int i = 2; i < MAX; i++) {
    fac[i] = fac[i - 1] * i % 1000000007;
    inv[i] = 1000000007 - inv[1000000007 % i] * (1000000007 / i) % 1000000007;
    finv[i] = finv[i - 1] * inv[i] % 1000000007;
  }
}
long long COM(int n, int k) {
  if (n < k) return 0;
  if (n < 0 || k < 0) return 0;
  return fac[n] * (finv[k] * finv[n - k] % 1000000007) % 1000000007;
}
int sieve[1000010];
void make_sieve() {
  for (int i = 0; i < 1000010; ++i) sieve[i] = true;
  sieve[0] = sieve[1] = false;
  for (int i = 0; i * i < 1000010; ++i) {
    if (sieve[i]) {
      for (int j = 2; j * i < 1000010; ++j) {
        sieve[i * j] = false;
      }
    }
  }
}
int GCD(ll a, ll b) {
  if (a < b) swap(a, b);
  if (b == 0)
    return a;
  else
    return GCD(b, a % b);
}
int main() {
  int N;
  cin >> N;
  vector<int> v;
  for (int i = 0; i < N; ++i) {
    int a;
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  bool c = true;
  for (int i = 0; i < N; ++i) {
    if ((v[i] ^ v[(i + 1) % N]) == v[(i + 2) % N]) {
    } else
      c = false;
  }
  if (c)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
