#include <bits/stdc++.h>
#pragma warning(disable : 4244)
#pragma warning(disable : 4996)
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
const int N = 5e4 + 10;
const int mod = 998244353;
const int inf = 0x3f3f3f3f;
int main() {
  int n;
  scanf("%d", &n);
  int sum = 0;
  for (int i = 1; i <= n; ++i) {
    int t;
    scanf("%d", &t);
    long long l = 1, r = t, ans = 1;
    while (r >= l) {
      long long mid = (l + r) >> 1;
      if ((1 + mid) * mid / 2 <= t) {
        ans = mid;
        l = mid + 1;
      } else
        r = mid - 1;
    }
    sum ^= ans;
  }
  if (sum)
    puts("NO");
  else
    puts("YES");
  return 0;
}
