#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int u;
  int cnt;
  while (cin >> n) {
    int sum = 0;
    for (int i = 0; i < n; ++i) {
      scanf("%d", &u);
      int tempSum = 0;
      cnt = 0;
      for (int i = 1; tempSum <= u; ++i) {
        tempSum += i;
        if (tempSum <= u) {
          ++cnt;
        }
      }
      sum ^= cnt;
    }
    if (sum) {
      cout << "NO" << endl;
    } else {
      cout << "YES" << endl;
    }
  }
  return 0;
}
