#include <bits/stdc++.h>
using namespace std;
int n, ans;
int main() {
  int i, x, y;
  cin >> n;
  for (i = 1; i <= n; i++) {
    cin >> y;
    for (x = 1; x * (x + 1) / 2 <= y; x++)
      ;
    ans ^= x - 1;
  }
  if (ans)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
