#include <bits/stdc++.h>
using namespace std;
unordered_map<long long, int> memo[61];
int f(int x, long long used) {
  if (memo[x].count(used)) return memo[x][used];
  set<int> st;
  for (int i = 1; i <= x; ++i) {
    if (!(used >> i & 1)) {
      st.insert(f(x - i, used | (1ll << i)));
    }
  }
  int &res = memo[x][used];
  while (st.count(res)) res++;
  return res;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int ans = 0, n;
  cin >> n;
  for (int(i) = (0); (i) < (int)(n); ++(i)) {
    int s;
    cin >> s;
    ans ^= f(s, 0);
  }
  cout << (ans ? "NO" : "YES") << endl;
}
