#include <bits/stdc++.h>
using namespace std;
int a[100], aa[100], n, ans;
int main() {
  for (int i = 1; i <= 60; i++) {
    int sum = 0;
    for (int j = 1; j <= 12; j++) {
      sum += j;
      if (sum > i) {
        aa[i] = j - 1;
        break;
      }
    }
  }
  cin >> n;
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    a[x] = !a[x];
  }
  for (int i = 1; i <= 60; i++) {
    if (a[i]) ans ^= aa[i];
  }
  if (!ans)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
