#include <bits/stdc++.h>
using namespace std;
ifstream fin("input.txt");
ofstream fout("output.txt");
int const M = 2e5 + 10, mod = 998244353, inf = 1e9 + 10;
map<int, int> dp[70], mark[70];
int fdp(int n, int msk) {
  bool mark2[70];
  for (int j = 0; j <= 60; j++) mark2[j] = 0;
  msk %= ((1LL << (n + 1)));
  if (n == 0) {
    mark[n][msk] = 1;
    return 0;
  }
  if (mark[n][msk]) return dp[n][msk];
  mark[n][msk] = 1;
  for (int j = n; j >= 1; j--) {
    if (!(msk & (1LL << j))) {
      mark2[fdp(n - j, (msk xor (1LL << j)))] = 1;
    }
  }
  for (int j = 0; j <= n + 1; j++) {
    if (!mark2[j]) {
      dp[n][msk] = j;
      break;
    }
  }
  return dp[n][msk];
}
int32_t main() {
  for (int i = 1; i <= 60; i++) {
    fdp(i, 0);
  }
  int n;
  cin >> n;
  int gr = 0;
  for (int i = 1; i <= n; i++) {
    int tmp;
    cin >> tmp;
    gr = gr xor dp[tmp][0];
  }
  if (gr)
    cout << "NO";
  else
    cout << "YES";
}
