#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100;
int grundy[MAXN];
int main() {
  int cv = 1, cc = 2;
  for (int i = 1; i <= MAXN; ++i) {
    grundy[i] = cv;
    cc--;
    if (!cc) {
      cv++;
      cc = cv + 1;
    }
  }
  int n, ans = 0;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    ans ^= grundy[x];
  }
  if (!ans)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
