#include <bits/stdc++.h>
using namespace std;
int num[61];
inline int read() {
  int x = 0;
  char c = getchar();
  while (c < '0' || c > '9') c = getchar();
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x;
}
int main() {
  for (int i = 1; i <= 2; i++) num[i] = 1;
  for (int i = 3; i <= 5; i++) num[i] = 2;
  for (int i = 6; i <= 9; i++) num[i] = 3;
  for (int i = 10; i <= 14; i++) num[i] = 4;
  for (int i = 15; i <= 20; i++) num[i] = 5;
  for (int i = 21; i <= 27; i++) num[i] = 6;
  for (int i = 28; i <= 35; i++) num[i] = 7;
  for (int i = 36; i <= 44; i++) num[i] = 8;
  for (int i = 45; i <= 54; i++) num[i] = 9;
  for (int i = 55; i <= 60; i++) num[i] = 10;
  int n = read(), x, tp = 0;
  while (n--) {
    x = read();
    tp ^= num[x];
  }
  puts(tp == 0 ? "YES" : "NO");
  return 0;
}
