#include <bits/stdc++.h>
using namespace std;
int n, a, ans, ub, sum[100];
int main() {
  for (int i = 1; i <= 60; i++) {
    sum[i] = i + sum[i - 1];
  }
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a);
    ub = upper_bound(sum + 1, sum + 60 + 1, a) - sum;
    ans ^= (ub - 1);
  }
  puts(ans == 0 ? "YES" : "NO");
  return 0;
}
