#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
const int SQRTN = 320;
const int LOGN = 20;
const double PI = acos(-1);
int n;
map<long long, int> dp[66];
int grundy(int idx, long long msk) {
  if (dp[idx].find(msk) != dp[idx].end()) return dp[idx][msk];
  int& ret = dp[idx][msk];
  set<int> st;
  for (int i = 1; i <= idx; i++) {
    if (msk & (1LL << i)) continue;
    st.insert(grundy(idx - i, msk | 1LL << i));
  }
  while (st.find(ret) != st.end()) ret++;
  return ret;
}
int main() {
  cin >> n;
  long long ans = 0;
  for (int a, i = 0; i < n; i++) {
    scanf("%d", &a);
    ans ^= grundy(a, 0LL);
  }
  if (ans)
    puts("NO");
  else
    puts("YES");
  return 0;
}
