#include <bits/stdc++.h>
using namespace std;
map<pair<int, set<int> >, int> dp;
int A[1000010];
long long cal(int a, set<int> val) {
  if (a == 0) return 0;
  if (dp.find(make_pair(a, val)) != dp.end()) return dp[make_pair(a, val)];
  int mk[61] = {};
  int pres[61] = {};
  for (auto i = val.begin(); i != val.end(); i++) mk[*i] = 1;
  for (int i = 1; i <= 60; i++) {
    if (!mk[i] && a - i >= 0) {
      val.insert(i);
      pres[cal(a - i, val)] = 1;
      val.erase(i);
    }
  }
  for (int i = 0; i <= 60; i++) {
    if (!pres[i]) return dp[make_pair(a, val)] = i;
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  set<int> ep;
  vector<int> grd;
  int rt = 0;
  for (int i = 0; i < n; i++) {
    cin >> A[i];
    if (A[i] <= 2)
      rt ^= 1;
    else if (A[i] <= 5)
      rt ^= 2;
    else if (A[i] <= 9)
      rt ^= 3;
    else if (A[i] <= 14)
      rt ^= 4;
    else if (A[i] <= 20)
      rt ^= 5;
    else if (A[i] <= 27)
      rt ^= 6;
    else if (A[i] <= 35)
      rt ^= 7;
    else if (A[i] <= 44)
      rt ^= 8;
    else if (A[i] <= 54)
      rt ^= 9;
    else
      rt ^= 10;
  }
  if (!rt)
    cout << "YES\n";
  else
    cout << "NO\n";
}
