#include <bits/stdc++.h>
using namespace std;
int gr[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};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int x = 0;
  while (n--) {
    int temp;
    cin >> temp;
    x ^= gr[temp];
  }
  if (x)
    cout << "NO\n";
  else
    cout << "YES\n";
  return 0;
}
