#include <bits/stdc++.h>
int val[61] = {0, 1, 1, 2, 2, 2, 3, 3,  3,  3,  4,  4,  4, 4, 4, 5,
               5, 5, 5, 5, 5, 6, 6, 6,  6,  6,  6,  6,  7, 7, 7, 7,
               7, 7, 7, 7, 8, 8, 8, 8,  8,  8,  8,  8,  8, 9, 9, 9,
               9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10};
std::map<long long, int> mp[66];
long long mask[66];
int calc(int a, long long b) {
  if (mp[a].find(b) == mp[a].end()) {
    int fr[66 + 5];
    memset(fr, 0, sizeof fr);
    for (int i = 1; i <= a; i++) {
      if ((b & (1LL << i)) == 0) {
        int aux = calc(a - i, (b | (1LL << i)) & mask[a - i]);
        if (aux < 66) fr[aux]++;
      }
    }
    int aux = 0;
    while (fr[aux]) aux++;
    mp[a][b] = aux;
  }
  return mp[a][b];
}
int main() {
  int n;
  fscanf(stdin, "%d", &n);
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int x;
    fscanf(stdin, "%d", &x);
    ans ^= val[x];
  }
  if (ans == 0)
    fprintf(stdout, "YES\n");
  else
    fprintf(stdout, "NO\n");
  fclose(stdin);
  fclose(stdout);
  return 0;
}
