#include <bits/stdc++.h>
using namespace std;
bool Pairsecond(const pair<int, int>& pf, pair<int, int>& ps) {
  return pf.second < ps.second;
}
int bit[100];
int main() {
  int n;
  cin >> n;
  if (n % 2 == 0) {
    cout << "No" << endl;
    return 0;
  }
  int a = 0;
  for (int i = 0; n > i; i++) {
    int tmp;
    cin >> tmp;
    for (int z = 0; tmp != 0; i++) {
      bit[z] += tmp % 2;
      tmp /= 2;
    }
  }
  for (int i = 0; 100 > i; i++) {
    if (!(bit[i] == 2 || bit[i] == 0)) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
