#include <bits/stdc++.h>
using namespace std;
using Pll = pair<long long, long long>;
const long long INF = 1LL << 60;
const long long MOD = 1000000007;
int main() {
  long long N;
  cin >> N;
  vector<long long> A(N);
  for (int i = 0; i < N; i++) cin >> A[i];
  vector<long long> cxor(N);
  sort(A.begin(), A.end());
  vector<long long> ord(N);
  ord[0] = A[0];
  ord[1] = A[1];
  cxor[0] = A[0];
  cxor[1] = A[0] ^ A[1];
  A.erase(A.begin());
  A.erase(A.begin());
  bool jg = true;
  for (int i = 2; i < N; i++) {
    auto it = lower_bound(A.begin(), A.end(), cxor[i - 1]);
    if (*it == cxor[i - 1]) {
      A.erase(it);
      cxor[i] = (ord[i - 1] ^ (*it));
      ord[i] = *it;
    } else {
      cout << "No" << endl;
      return 0;
    }
  }
  if (((ord[N - 2] ^ ord[N - 1]) ^ ord[0]) != 0) {
    cout << "No" << endl;
    return 0;
  }
  if (((ord[N - 1] ^ ord[1]) ^ ord[0]) != 0) {
    cout << "No" << endl;
    return 0;
  }
  cout << "Yes" << endl;
  return 0;
}
