#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:102400000,102400000")
const int N = 2e5 + 10;
int main() {
  int n, ans = 0, si;
  cin >> n;
  for (int ca = 1; ca <= n; ca++) {
    cin >> si;
    ans ^= ((int)sqrt(8 * si + 1) - 1) / 2;
  }
  ans ? puts("NO") : puts("YES");
  return 0;
}
