#include <bits/stdc++.h>
using namespace std;
int grundy[70];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> s(n);
  for (int i = 0; i < n; i++) {
    cin >> s[i];
  }
  int idx = 1;
  for (int x = 1; idx <= 60; x++) {
    for (int i = 0; i < x + 1 and idx <= 60; i++) {
      grundy[idx++] = x;
    }
  }
  int res = 0;
  for (int i = 0; i < n; i++) {
    res ^= grundy[s[i]];
  }
  if (res)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
