#include <bits/stdc++.h>
using namespace std;
void in(int& a);
void in(long long& a);
int a, n, x, y, ans;
int main() {
  in(n);
  for (register int i = 1; i <= n; i++) {
    in(a);
    for (x = 1, y = 1; x <= a; y++, x += y)
      ;
    y--;
    ans ^= y;
  }
  puts(ans ? "NO" : "YES");
  return 0;
}
void in(long long& a) {
  register char c;
  register bool y = false;
  c = getchar();
  a = 0;
  while (c < '0' || c > '9') {
    if (c == '-') {
      c = getchar();
      y = true;
      break;
    }
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    a = (a << 3) + (a << 1) + c - '0';
    c = 0;
    c = getchar();
  }
  if (y) a = -a;
}
void in(int& a) {
  register char c;
  register bool y = false;
  c = getchar();
  a = 0;
  while (c < '0' || c > '9') {
    if (c == '-') {
      c = getchar();
      y = true;
      break;
    }
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    a = (a << 3) + (a << 1) + c - '0';
    c = 0;
    c = getchar();
  }
  if (y) a = -a;
}
