#include <bits/stdc++.h>
using namespace std;
map<pair<int, long long>, int> my;
map<pair<int, long long>, bool> check;
int grundy(int num, long long mask) {
  if (num == 0) return 0;
  if (check[make_pair(num, mask)] == true) return my[make_pair(num, mask)];
  int f[63] = {0}, mex = 0;
  for (long long i = num; i >= 1; i--) {
    if (mask & (1LL << (i - 1))) continue;
    f[grundy(num - i, mask | (1LL << (i - 1)))] = 1;
  }
  for (int i = 0; i < 63; i++)
    if (!f[i]) {
      mex = i;
      break;
    }
  check[make_pair(num, mask)] = true;
  return my[make_pair(num, mask)] = mex;
}
int main() {
  int n, val, ans = 0;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &val);
    ans ^= grundy(val, 0);
  }
  if (ans == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
