#include <bits/stdc++.h>
using namespace std;
const int N = 65;
int n;
int sg[N];
int main() {
  cin >> n;
  for (int i = 1; i <= 60; i++)
    for (int j = 1; (((j + 1) * j) >> 1) <= i; j++) sg[i] = j;
  int ans = 0;
  for (int i = 1, x; i <= n; i++) scanf("%d", &x), ans ^= sg[x];
  puts(ans ? "NO" : "YES");
  return 0;
}
