#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int grundy(int x) {
  int sum = 0;
  int num = 0;
  int next = 1;
  while (sum <= x) {
    sum += (next++);
    num++;
  }
  return num - 1;
}
int main() {
  int n, x, ans = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> x;
    ans ^= grundy(x);
  }
  if (ans == 0)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
