#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int T, n, m;
int t1, t2;
bool w;
map<pair<int, long long>, int> mex;
int solve(int rem = 60, long long msk = (1 << 60) - 1) {
  if (mex.count({rem, msk})) {
    return mex[{rem, msk}];
  }
  mex[{rem, msk}] = 0;
  int x = 0;
  set<int> s;
  for (int i = 1; i <= rem; ++i) {
    if ((msk >> i) & 1)
      s.insert(
          solve(rem - i, ((1ll << (rem - i + 1)) - 1) & (msk & ~(1ll << i))));
  }
  while (s.count(x)) ++x;
  return mex[{rem, msk}] = x;
}
int main() {
  scanf("%d", &n);
  scanf("%d", &t1);
  T = solve(t1, (1ll << t1 + 1) - 1);
  for (int i = 1; i < n; ++i) {
    scanf("%d", &t1);
    T ^= solve(t1, (1ll << t1 + 1) - 1);
  }
  if (T) {
    printf("NO");
  } else {
    printf("YES");
  }
  printf("\n");
}
