#include <bits/stdc++.h>
using namespace std;
signed main() {
  int n;
  scanf("%d", &n);
  int sgg = 0;
  for (int i = 1, t; i <= n; ++i) {
    scanf("%d", &t);
    int j = 1;
    while (true) {
      t -= j;
      if (t <= j) break;
      j++;
    }
    sgg ^= j;
  }
  puts(sgg ? "NO" : "YES");
  return 0;
}
