#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.at(i);
  }
  for (int p = 0; p < n; p++) {
    cout << a.at(p) << endl;
  }
  sort(a.begin(), a.end());
  bool ans = false;
  vector<int> c(n);
  for (int i = 1; i < n; i++) {
    c.at(0) = a.at(0);
    c.at(1) = a.at(i);
    for (int j = 2; j < n - 1; j++) {
      c.at(j) = (c.at(j - 1)) ^ (c.at(j - 2));
    }
    for (int p = 0; p < n; p++) {
      cout << c.at(p) << endl;
    }
    sort(c.begin(), c.end());
    for (int k = 0; k < n; k++) {
      if (c.at(k) != a.at(k)) {
        break;
      } else {
        if (k == n - 1) {
          ans = true;
        }
      }
    }
    if (ans == true) {
      break;
    }
  }
  if (ans == true) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
}
