#include <bits/stdc++.h>
using namespace std;
int g[65];
int main() {
  int n;
  scanf("%d", &n);
  int ans = 0;
  g[0] = 0;
  int cur = 1;
  int cnt = 1;
  while (cnt <= 60) {
    int i = 1;
    while (cnt <= 60 && i <= cur + 1) {
      g[cnt] = cur;
      cnt++;
      i++;
    }
    cur++;
  }
  while (n--) {
    int s;
    scanf("%d", &s);
    ans = ans ^ g[s];
  }
  if (ans == 0)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
