#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<int> a(N), r(N - 1);
  for (size_t i = 0; i < N; i++) {
    cin >> a[i];
    if (i > 0) r[i - 1] = a[i];
  }
  function<bool(int, int, int, vector<int>)> search = [&](int f, int p, int pp,
                                                          vector<int> r) {
    if (r.size() == 1) {
      if ((r[0] ^ pp) == p && (f ^ p) == r[0]) {
        return true;
      } else {
        return false;
      }
    }
    for (int k = 0; k < r.size(); k++) {
      if (pp == -1 || (pp ^ r[k]) == p) {
        vector<int> rn(r.size() - 1);
        for (int j = 0; j < k; j++) {
          rn[j] = r[j];
        }
        for (int j = k + 1; j < r.size(); j++) {
          rn[j - 1] = r[j];
        }
        return search(f, r[k], p, rn);
      }
    }
    return false;
  };
  if (search(a[0], a[0], -1, r)) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
