#include <bits/stdc++.h>
using namespace std;
using ll = int64_t;
const vector<ll> dx = {0, 1, 0, -1}, dy = {1, 0, -1, 0};
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll N;
  cin >> N;
  vector<ll> a(N);
  for (ll i = 0; i < N; ++i) {
    cin >> a[i];
  }
  ll left = a.size() - 1;
  bool exist = false;
  for (ll i = 0; i < N; ++i) {
    exist = false;
    for (ll right = 0; right < N; ++right) {
      if (left == right || i == right) {
        continue;
      }
      int haita = a[left] ^ a[right];
      if (!((a[i] == haita))) {
        continue;
      }
      left = i;
      exist = true;
      break;
    }
    if (!exist) {
      cout << "No" << endl;
      return 0;
    }
  }
  if (left != a.size() - 1) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
}
