#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const long long linf = (long long)1e18;
const double eps = (double)1e-8;
const int mod = (int)1e9 + 7;
const int maxn = (int)1e5 + 5;
const int MX = (int)60;
int a[111];
int main() {
  int x = 2;
  int cnt = 0;
  for (int i = (1); i <= (int)(10); ++i) {
    for (int j = (1); j <= (int)(x); ++j) {
      ++cnt;
      a[cnt] = i;
      if (cnt == MX) break;
    }
    ++x;
    if (cnt == MX) break;
  }
  int n;
  scanf("%d\n", &n);
  int ans = 0;
  for (int i = (1); i <= (int)(n); ++i) {
    int x;
    scanf("%d\n", &x);
    ans ^= a[x];
  }
  if (ans == 0)
    cout << "YES"
         << "\n";
  else
    cout << "NO"
         << "\n";
  return 0;
}
