#include <bits/stdc++.h>
using namespace std;
const long long INF = 2e18;
bool prime[100010];
void SieveOfEratosthenes(long long n) {
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
}
long long power(long long x, long long y) {
  if (y == 0)
    return 1;
  else if (y % 2 == 0)
    return power(x, y / 2) * power(x, y / 2);
  else
    return x * power(x, y / 2) * power(x, y / 2);
}
long long power1(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res *= a;
    }
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long mod_power(long long a, long long b, long long m) {
  long long res = 1;
  a %= m;
  while (b) {
    if (b & 1) {
      res = res * a % m;
    }
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long printDivisors(long long n) {
  long long count = 0;
  for (long long i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      if (n / i == i)
        count++;
      else
        printf("%d %d ", i, n / i);
    }
  }
}
bool isPrime(int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long par[1000];
long long find(long long x) {
  if (par[x] != x) {
    par[x] = find(par[x]);
  }
  return par[x];
}
void unionset(long long x, long long y) {
  long long rx = find(x);
  long long ry = find(y);
  par[rx] = ry;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n;
  cin >> n;
  long long count = 0;
  unordered_map<long long, long long> mp;
  long long a[n];
  vector<long long> v;
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    mp[a[i]]++;
    if (mp[a[i]] == 1) v.push_back(a[i]);
  }
  sort((v).begin(), (v).end());
  count = mp[0];
  long long ctr = 0;
  for (long long i = 0; i < v.size(); i++) {
    if (v[i] == 0) continue;
    ctr += (mp[v[i]] - 1);
  }
  vector<long long> b;
  bool flag = true;
  sort((v).begin(), (v).end());
  for (long long i = 0; i < v.size(); i++) {
    if (v[i] == 0) continue;
    while (mp[v[i]]) {
      b.push_back(v[i]);
      mp[v[i]]--;
      if (mp[v[i]]) {
        if (!mp[0])
          flag = false;
        else {
          b.push_back(0);
          mp[0]--;
        }
      }
    }
  }
  while (mp[0]) {
    b.push_back(0);
    mp[0]--;
  }
  for (long long i = 1; i <= n - 2; i++) {
    if ((b[i - 1] ^ b[i + 1]) != b[i]) flag = false;
  }
  if ((b[n - 2] ^ b[0]) != b[n - 1]) flag = false;
  if ((b[1] ^ b[n - 1]) != b[0]) flag = false;
  if (flag)
    cout << "Yes";
  else
    cout << "No";
}
