#include <bits/stdc++.h>
int col8[8] = {0, 1, 1, 1, 0, -1, -1, -1};
int row8[8] = {1, 1, 0, -1, -1, -1, 0, 1};
int col4[4] = {1, 0, -1, 0};
int row4[4] = {0, 1, 0, -1};
using namespace std;
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T power(T n, T p) {
  T res = 1;
  for (int i = 0; i < p; i++) res *= n;
  return res;
}
template <class T>
double getdist(T a, T b) {
  return sqrt((a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}
template <class T>
T extract(string s, T ret) {
  stringstream ss(s);
  ss >> ret;
  return ret;
}
template <class T>
string tostring(T n) {
  stringstream ss;
  ss << n;
  return ss.str();
}
struct fast {
  fast() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
  }
} cincout;
int dp[66][66];
int call(int indx, int baki) {
  if (baki == 0) return 0;
  int &ret = dp[indx][baki];
  if (~ret) return ret;
  set<int> ss;
  for (int i = indx; i <= baki; i++) ss.insert(call(i + 1, baki - i));
  ret = 0;
  while (ss.find(ret) != ss.end()) ret++;
  return ret;
}
int arr[2000010];
int main() {
  int n, i;
  cin >> n;
  int res = 0;
  memset(dp, -1, sizeof dp);
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    res ^= call(1, arr[i]);
  }
  if (res)
    cout << "NO";
  else
    cout << "YES";
  return 0;
}
