#include <bits/stdc++.h>
using namespace std;
int N;
int grundy[66];
int take[66];
int cek_grundy(int now) {
  if (now == 0) return 0;
  if (now == 1 && take[1] == 0) return 1;
  if (now == 1 && take[1] == 1) return 0;
  int ada[61];
  memset(ada, 0, sizeof ada);
  for (int i = 1; i <= now; i++) {
    if (take[i]) continue;
    take[i] = 1;
    ada[cek_grundy(now - i)] = 1;
    take[i] = 0;
  }
  for (int i = 0; i <= now; i++) {
    if (ada[i] == 0) return i;
  }
  return 0;
}
int main() {
  grundy[0] = 0;
  grundy[1] = 1;
  int rep = 1;
  int now = 0;
  int loops = rep;
  for (int i = 0; i <= 60; i++) {
    grundy[i] = now;
    loops--;
    if (loops == 0) {
      rep++;
      now++;
      loops = rep;
    }
  }
  scanf("%d", &N);
  int res = 0;
  for (int i = 0; i < N; i++) {
    int x;
    scanf("%d", &x);
    res ^= grundy[x];
  }
  if (res)
    printf("NO\n");
  else
    printf("YES\n");
}
