#include <bits/stdc++.h>
using namespace std;
int ff[66];
int gg(int n, int mask) {
  int f[33] = {};
  for (int i = 0; i < n; i++)
    if (mask & (1 << i))
      ;
    else
      f[gg(n - i - 1, mask | (1 << i))] = 1;
  for (int i = 0; i < 33; i++)
    if (!f[i]) return i;
}
int main() {
  int cnt = 1;
  for (int i = 0; i < 66; i++) {
    for (int j = 0; j < cnt; j++) ff[i + j] = cnt - 1;
    i += cnt - 1;
    cnt++;
  }
  int n;
  scanf("%d", &n);
  int ans = 0;
  int x;
  for (int i = 0; i < n; i++) scanf("%d", &x), ans ^= ff[x];
  if (ans)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
