#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
const int N = 100005;
void solve() {
  long long n;
  cin >> n;
  vector<long long> v(n);
  for (long long i = 0; i <= n - 1; i++) {
    cin >> v[i];
  }
  sort((v).begin(), (v).end());
  for (long long i = 0; i <= n - 1; i++) {
    if ((v[(i - 1 + n) % n] ^ v[(i + 1) % n]) != v[i]) {
      cout << "No";
      return;
    }
  }
  cout << "Yes";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    solve();
  }
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
