#include <bits/stdc++.h>
using namespace std;
long long int myXOR(long long int x, long long int y) {
  return (x | y) & (~x | ~y);
}
void solve() {
  long long int n;
  cin >> n;
  long long int v[n];
  for (long long int i = 0; i < n; i++) cin >> v[i];
  sort(v, v + n);
  for (long long int i = 0; i < n; i++) {
    if (i == n - 1) {
      if (myXOR(v[i - 1], v[0]) != v[n - 1]) {
        cout << "No" << '\n';
        return;
      }
    } else if (i == 0) {
      if (myXOR(v[n - 1], v[1]) != v[0]) {
        cout << "No" << '\n';
        return;
      }
    } else if (myXOR(v[i - 1], v[i + 1]) != v[i]) {
      cout << "No" << '\n';
      return;
    }
  }
  cout << "Yes" << '\n';
  return;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
