#include <bits/stdc++.h>
using namespace std;
bool Pairsecond(const pair<int, int>& pf, pair<int, int>& ps) {
  return pf.second < ps.second;
}
int biit[100][2];
int main() {
  int n;
  cin >> n;
  int a = 0;
  bool zeroonly = true;
  int mx = 0;
  int aa[n];
  for (int i = 0; n > i; i++) {
    cin >> aa[i];
    mx = max(mx, aa[i]);
  }
  for (int i = 0; n > i; i++) {
    int mxtmp = mx;
    a ^= aa[i];
    for (int z = 0; mxtmp != 0; z++) {
      biit[z][1] += aa[i] % 2;
      biit[z][0] += (aa[i] + 1) % 2;
      aa[i] /= 2;
      mxtmp /= 2;
    }
  }
  for (int i = 0; 100 > i; i++) {
    if (biit[i][1] != biit[i][0] * 2) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
