#include <bits/stdc++.h>
using namespace std;
int s[66];
int main() {
  int n;
  scanf("%d", &n);
  int an = 0, k = 1;
  for (int i = 1; i < 61; i++) {
    if (i == (k + 2) * (k + 1) / 2) k++;
    s[i] = k;
  }
  for (int i = 0; i < n; i++) {
    int now;
    scanf("%d", &now);
    an ^= s[now];
  }
  if (an == 0)
    printf("YES");
  else
    printf("NO");
}
