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