#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, R, ans;
  string S;
  cin >> N;
  vector<long long> a(N), b(40);
  for (int i = 0; i < 40; i++) {
    b[i] = 0;
  }
  for (int i = 0; i < N; i++) {
    cin >> a[i];
    for (int j = 39; j > 0; j--) {
      if (a[i] % 2 == 1) {
        b[j]++;
      }
      a[i] /= 2;
      if (a[i] == 0) {
        break;
      }
    }
  }
  if (N % 2 == 0) {
    for (int i = 0; i < 40; i++) {
      if (b[i] != N / 2) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    return 0;
  } else {
    for (int i = 0; i < 40; i++) {
      if (b[i] == 0) {
        continue;
      }
      if (b[i] != N / 2 + 1) {
        cout << "No" << endl;
        return 0;
      }
    }
    cout << "Yes" << endl;
    return 0;
  }
}
