#include <bits/stdc++.h>
using namespace std;
int n, x, i, t;
int main() {
  string s =
      "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";
  cin >> n;
  for (i = 1; i <= n; i++) {
    scanf("%d", &t);
    if (t >= 55)
      x ^= 10;
    else
      x ^= (s[2 * t] - '0');
  }
  if (!x)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
