#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (auto &i : v) cin >> i;
  sort(v.begin(), v.end());
  bool flag = true;
  for (int i = 0; i < n; ++i) {
    if ((v[i] ^ v[(i + 2) % n]) != v[(i + 1) % n]) {
      flag = false;
      break;
    }
  }
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
