#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
int N;
vector<long long> V(100, 0);
long long j = 1, k = 0, p = 1;
vector<long long> M;
void sok() {
  M.push_back(1);
  for (int o = 0; o < 80; o++) {
    p *= 2;
    M.push_back(p);
  }
}
void solve(int A, int i) {
  for (int u = 0; u < 79; u++) {
    if (A >= M[u] && A <= M[u + 1]) {
      V[u]++;
      if (A - M[u] == 0) break;
      solve(A - M[u], i);
    }
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  sok();
  cin >> N;
  int A[N];
  for (int i = 0; i < N; i++) {
    cin >> A[i];
    solve(A[i], i);
  }
  for (int i = 0; i < V.size(); i++) {
    if (V[i] == 0) continue;
    if (V[i] % 2 == 1) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
