#include <bits/stdc++.h>
const long long N = 500005;
const long long mod = 1e9 + 7;
using namespace std;
void solve() {
  long long n, m, k, x = 0, y = 0, c = 0, q, ans = 0;
  cin >> n;
  long long a[n];
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (int i = 1; i < n - 1; ++i) {
    if ((a[i - 1] ^ a[i + 1]) != a[i]) {
      cout << "No"
           << "\n";
      return;
    }
  }
  if ((a[n - 1] ^ a[1]) != a[0]) {
    cout << "No"
         << "\n";
    return;
  }
  if ((a[n - 2] ^ a[0]) != a[n - 1]) {
    cout << "No"
         << "\n";
    return;
  }
  cout << "Yes";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long T = 1;
  while (T--) {
    solve();
  }
  return 0;
}
