#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 5e5 + 5;
map<ll, ll> was[N], ans[N];
ll grundy(int x, ll mask) {
  if (was[x][mask]) return ans[x][mask];
  was[x][mask] = 1;
  vector<int> used(66, 0);
  for (int i = 1; i <= x; ++i) {
    if (!((mask >> i) & 1)) {
      ll y = grundy(x - i, mask ^ (1ll << i));
      used[y] = 1;
    }
  }
  for (int i = 0; i <= 60; ++i) {
    if (!used[i]) {
      ans[x][mask] = i;
      break;
    }
  }
  return ans[x][mask];
}
int main() {
  ios ::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  ll b = 0;
  for (int i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    b ^= grundy(x, 0);
  }
  cout << (!b ? "YES" : "NO");
  return 0;
}
