#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j;
  long long ans = 0;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    long long x;
    scanf("%lld", &x);
    ans ^= (long long)(((double)sqrt(1 + (double)8.0 * (double)x) - 1.0) / 2);
  }
  if (ans)
    printf("NO\n");
  else
    printf("YES\n");
  return 0;
}
