#include <bits/stdc++.h>
int D[61];
int main() {
  int i, j, k, cnt;
  for (i = 0; i <= 60; i++) {
    cnt = 0;
    for (j = 1, k = i; k > 0; j++, k -= j) cnt++;
    D[i] = cnt;
  }
  int n, x, p = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    p ^= D[x];
  }
  printf("%s\n", p == 0 ? "YES" : "NO");
  return 0;
}
