#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[61], cnt = 1, res = 0, i = 0, tmp;
  while (i < 61) {
    tmp = cnt;
    while (tmp-- && i < 61) {
      arr[i] = res;
      i++;
    }
    res++;
    cnt++;
  }
  int n, ans = 0, s;
  cin >> n;
  while (n--) {
    cin >> s;
    ans ^= arr[s];
  }
  cout << (ans ? "NO" : "YES");
  return 0;
}
