#include <bits/stdc++.h>
using namespace std;
int n, a[1100000], b[1100000];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int i = 0; i < n; i++) {
    int k = 1, cnt = 0;
    while (1) {
      a[i] -= k;
      k++;
      if (a[i] < 0) break;
      cnt++;
    }
    b[i] = cnt;
  }
  int res = 0;
  for (int i = 0; i < n; i++) {
    res ^= b[i];
  }
  if (!res)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
