#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a;
  int n;
  int i;
  bool s = true, s2 = true;
  int e, e2;
  cin >> n;
  for (i = 0; i < n; i++) {
    int an;
    cin >> an;
    a.emplace_back(an);
    if (i >= 2) {
      e = a.at(0) ^ a.at(2);
      if (e != a.at(1)) {
        s = false;
      }
      e2 = a.at(0) ^ a.at(1) ^ a.at(2);
      if (e2 != 0) {
        s2 = false;
      }
      a.erase(a.begin());
    }
  }
  if (e || e2) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
