#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, int> cnt[61];
int mex(vector<int> &vc) {
  set<int> st(vc.begin(), vc.end());
  for (int i = 0;; ++i)
    if (st.find(i) == st.end()) return i;
  return 0;
}
int get(int n, long long mask) {
  if (n == 0) {
    cnt[n][mask] = 0;
    return 0;
  }
  if (cnt[n].find(mask) != cnt[n].end()) return cnt[n][mask];
  vector<int> vc;
  for (int i = 1; i <= n; ++i) {
    if (((mask >> i) & 1) == 0) vc.push_back(get(n - i, mask | (1LL << i)));
  }
  if (vc.size() == 0) {
    cnt[n][mask] = 0;
    return 0;
  }
  cnt[n][mask] = mex(vc);
  return cnt[n][mask];
}
int main() {
  int n;
  scanf("%i", &n);
  int _xor = 0;
  for (int i = 0; i < n; ++i) {
    int a;
    scanf("%i", &a);
    _xor ^= get(a, 0LL);
  }
  if (!_xor)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
