#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int a[maxn];
int main() {
  int n;
  int i, x, j, sum, ans;
  cin >> n;
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    for (j = 1, sum = 0; j <= 60; j++) {
      x -= j;
      if (x <= j) break;
    }
    a[i] = j;
    ans = i == 0 ? a[i] : ans ^ a[i];
  }
  if (ans)
    printf("NO");
  else
    printf("YES");
}
