#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, x;
  bool frag = true;
  vector<long long> a(N);
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  do {
    for (long long i = 0; i < N; i++) {
      if (i == 0) {
        x = a[N - 1] ^ a[1];
        if (x != a[i]) frag = false;
      } else if (i == N - 1) {
        x = a[N - 2] ^ a[0];
        if (x != a[i]) frag = false;
      } else {
        x = a[i - 1] ^ a[i + 1];
        if (x != a[i]) frag = false;
      }
    }
  } while (next_permutation(a.begin(), a.end()));
  if (frag) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
