#include <bits/stdc++.h>
using namespace std;
mt19937 gen;
const int INF = (int)1.01e9;
const int MOD = 1000000007;
const double EPS = 1e-9;
const double PI = acos(-1);
int good[] = {0, 1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66};
int map_to_good(int k) {
  int i;
  for (i = 0; i <= 11; i++) {
    if (good[i] > k) break;
  }
  return i - 1;
}
bool solve() {
  int n;
  if (scanf("%d", &n) < 1) return false;
  int res = 0;
  for (int i = 0; i < n; i++) {
    int a;
    scanf("%d", &a);
    res ^= map_to_good(a);
  }
  puts(res ? "NO" : "YES");
  return true;
}
int main() {
  while (solve()) {
  }
  return 0;
}
