#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9;
const int maxn = 1e5 + 10;
map<pair<int, set<int> >, int> cache;
int grundy(pair<int, set<int> > st) {
  if (cache.find(st) != cache.end()) return cache[st];
  set<int> s;
  for (int i = 1; i <= st.first; i++) {
    if (st.second.find(i) == st.second.end()) {
      pair<int, set<int> > ts = st;
      ts.first = st.first - i;
      ts.second.insert(i);
      s.insert(grundy(ts));
    }
  }
  int ret = 0;
  while (s.find(ret) != s.end()) ret++;
  return cache[st] = ret;
}
int main() {
  if (0) {
    for (int i = 1; i <= 60; i++) {
      pair<int, set<int> > s;
      s.first = i;
      s.second = set<int>();
      printf("%d,", grundy(s));
    }
    puts("");
  } else {
    int xd[] = {0, 1, 1, 2, 2, 2, 3, 3,  3,  3,  4,  4,  4, 4, 4, 5,
                5, 5, 5, 5, 5, 6, 6, 6,  6,  6,  6,  6,  7, 7, 7, 7,
                7, 7, 7, 7, 8, 8, 8, 8,  8,  8,  8,  8,  8, 9, 9, 9,
                9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10};
    int n, x, s;
    scanf("%d", &n);
    s = 0;
    for (int i = 0; i < n; i++) {
      scanf("%d", &x);
      s ^= xd[x];
    }
    puts(!s ? "YES" : "NO");
  }
  return 0;
}
