#include <bits/stdc++.h>
using namespace std;
void setIO(const string &name) {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cin.exceptions(istream::failbit);
}
const int inf = 0x3f3f3f3f, mod = 1e9 + 7, maxn = 1e6 + 5;
int n;
map<pair<int, long long>, int> grundy;
int solve(int cnt, long long state) {
  if (grundy.find({cnt, state}) != grundy.end()) {
    return grundy[{cnt, state}];
  }
  set<int> nums;
  for (int i = 1; i <= cnt; ++i) {
    if (state & (1ll << i)) {
      nums.insert(solve(cnt - i, state ^ (1ll << i)));
    }
  }
  int pre = -1;
  for (auto &i : nums) {
    if (i != pre + 1) {
      return grundy[{cnt, state}] = pre + 1;
    }
    pre = i;
  }
  return grundy[{cnt, state}] = pre + 1;
}
int main() {
  setIO("1");
  cin >> n;
  int val = 0;
  for (int i = 0; i < n; ++i) {
    int a;
    cin >> a;
    val ^= (solve(a, (1ll << 62) - 1));
  }
  cout << (val ? "NO" : "YES") << "\n";
  return 0;
}
