#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  bool found = false;
  for (int i = 0; i < n - 1; i++) {
    found = false;
    for (int j = i + 1; j < n; j++) {
      int tgt = a.at(i) ^ a.at(j);
      auto it = find(a.begin(), a.end(), tgt);
      if (it != a.end()) {
        a.erase(it);
        auto it2 = a.begin();
        a.insert(++it2, tgt);
        found = true;
        break;
      }
    }
    if (!found) {
      break;
    }
  }
  if (found) {
    found = (a.at(n - 1) ^ a.at(1) == a.at(0));
  }
  if (found) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
