#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, int> m;
int mex(unordered_set<int> set) {
  int m = 0;
  while (set.find(m) != set.end()) m++;
  return m;
}
int G(int n, long long mask) {
  if (n == 0) return 0;
  if (m.find({n, mask}) != m.end()) return m[{n, mask}];
  unordered_set<int> set;
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    if (((1 << i) & mask) == 0) set.insert(G(n - i, mask | 1 << i));
  }
  m[{n, mask}] = mex(set);
  return m[{n, mask}];
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t, n;
  cin >> t;
  int ans = 0;
  while (t--) {
    cin >> n;
    ans ^= G(n, 0);
  }
  if (ans == 0)
    cout << "YES";
  else
    cout << "NO";
}
