#include <bits/stdc++.h>
using namespace std;
int G[61];
int main() {
  ios::sync_with_stdio(false);
  int cur = 0, d = 1, nxt = 1;
  for (int i = 0; i < int(61); i++) {
    if (i == nxt) {
      G[i] = ++cur;
      nxt += ++d;
    } else {
      G[i] = cur;
    }
  }
  int n;
  cin >> n;
  int res = 0;
  for (int i = 0; i < int(n); i++) {
    int x;
    cin >> x;
    res ^= G[x];
  }
  cout << (res == 0 ? "YES\n" : "NO\n") << endl;
  return 0;
}
