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