#include <bits/stdc++.h>
using namespace std;
int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
int ddx[8] = {1, 1, 0, -1, -1, -1, 0, 1}, ddy[8] = {0, 1, 1, 1, 0, -1, -1, -1};
void mad(long long &a, long long b) {
  a = (a + b) % 1000000007;
  if (a < 0) a += 1000000007;
}
long long gcd(long long a, long long b) {
  if (a > b) swap(a, b);
  if (!a) return b;
  return gcd(b % a, a);
}
void solve() {
  int n;
  cin >> n;
  int a[n];
  map<int, int> mp;
  int c = 0;
  vector<int> u;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (mp[a[i]] == 0) {
      u.push_back(a[i]);
      c++;
    }
    mp[a[i]]++;
  }
  if (u.size() == 1) {
    cout << "No";
    return;
  }
  vector<int> v;
  v.push_back(u[0]);
  v.push_back(u[1]);
  mp[u[0]]--;
  mp[u[1]]--;
  int i = 0;
  while (v.size() != n) {
    int x = v[i] ^ v[i + 1];
    if (mp[x]) {
      v.push_back(x);
      i++;
      mp[x]--;
    } else {
      cout << "No";
      return;
    }
  }
  if ((v[n - 1] ^ v[n - 2]) == v[0] && (v[n - 1] ^ v[0]) == v[1])
    cout << "Yes";
  else
    cout << "No";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
}
