#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 2e5 + 10;
map<long long, int> mc[N];
int dfs(int x, long long o) {
  if (mc[x].count(o)) return mc[x][o];
  int &ret = mc[x][o] = 0;
  int flag[70];
  memset((flag), (0), sizeof(flag));
  for (int i = 1; i <= x; i++) {
    if (o >> i & 1) continue;
    flag[dfs(x - i, 1 << i | o)] = 1;
  }
  for (int i = 0; i < 70; i++) {
    if (flag[i] == 0) {
      ret = i;
      break;
    }
  }
  return ret;
}
int main() {
  int n;
  cin >> n;
  int ans = 0;
  while (n--) {
    int x;
    cin >> x;
    ans ^= dfs(x, 0);
  }
  if (ans)
    puts("NO");
  else
    puts("YES");
  return 0;
}
