#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N;
  scanf("%i", &N);
  int i;
  int a[N];
  int b[N];
  int res = 0;
  for (i = 0; i < N; i++) {
    scanf("%i", &a[i]);
    b[i] = 1;
    if (a[i] >= 3) b[i] = 2;
    if (a[i] >= 6) b[i] = 3;
    if (a[i] >= 10) b[i] = 4;
    if (a[i] >= 15) b[i] = 5;
    if (a[i] >= 21) b[i] = 6;
    if (a[i] >= 28) b[i] = 7;
    if (a[i] >= 36) b[i] = 8;
    if (a[i] >= 45) b[i] = 9;
    if (a[i] >= 55) b[i] = 10;
    res ^= b[i];
  }
  if (res == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
