#include <bits/stdc++.h>
using namespace std;
const int maxn = 70;
int cnt[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  for (int i = 1; i <= 60; i++) {
    int now = 1;
    int sum = i;
    while (now <= sum) cnt[i]++, sum -= now, now++;
  }
  int n, num, res = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> num;
    res ^= cnt[num];
  }
  if (!res)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
