#include <bits/stdc++.h>
using namespace std;
int dx8[8] = {1, -1, 0, 0, 1, 1, -1, -1};
int dy8[8] = {0, 0, 1, -1, 1, -1, 1, -1};
void file() {}
void fast() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
}
int d[] = {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};
int main() {
  file();
  fast();
  int n;
  cin >> n;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    ans ^= d[a];
  }
  if (ans == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
