#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<long> a(N);
  vector<long> a_sort(N);
  long ab = 0;
  for (int i = 0; i < N; i++) {
    cin >> a.at(i);
    a_sort.at(i) = a.at(i);
    ab ^= a.at(i);
  }
  if (0 != ab) {
    cout << "No" << endl;
    return 0;
  }
  sort(a_sort.begin(), a_sort.end());
  if (0 == a_sort.at(N - 1)) {
    cout << "Yes" << endl;
    return 0;
  }
  vector<long> b(N);
  b.at(0) = a.at(0);
  for (int i = 1; i < N; i++) {
    if (b.at(1) == a.at(i)) continue;
    b.at(1) = a.at(i);
    long ab = b.at(i - 1) ^ b.at(i);
    int j = 2;
    while (j < N) {
      b.at(j) = ab;
      ab = b.at(j - 1) ^ b.at(j);
      j++;
    }
    if (ab == a.at(0)) {
      sort(b.begin(), b.end());
      bool SS = true;
      for (int k = 0; k < b.size(); k++) {
        if (b.at(k) != a_sort.at(k)) {
          SS = false;
          break;
        }
      }
      if (SS) {
        cout << "Yes" << endl;
        return 0;
      }
    }
  }
  cout << "No" << endl;
  return 0;
}
