#include <bits/stdc++.h>
using namespace std;
int i, n, x;
int main() {
  scanf("%d", &n);
  while (n--) scanf("%d", &i), x ^= (int)((sqrt(8 * i + 1) - 1) / 2);
  if (x)
    printf("NO");
  else
    printf("YES");
}
