#include <bits/stdc++.h>
using namespace std;
const int kMaxS = 1 + 60;
map<pair<int, long long>, int> my_map;
long long GetSpragueGrundy(int nr, long long mask) {
  if (my_map.find(make_pair(nr, mask)) != my_map.end()) {
    return my_map[make_pair(nr, mask)];
  }
  int degree = 0;
  long long included = 0;
  for (int i = 1; i <= nr; i++) {
    if (!(mask & (1LL << i))) {
      included |= (1LL << GetSpragueGrundy(nr - i, mask ^ (1 << i)));
    }
  }
  for (long long i = 0; i <= kMaxS; i++) {
    if (!(included & (1LL << i))) {
      my_map[make_pair(nr, mask)] = i;
      return i;
    }
  }
}
bool obtained[kMaxS];
int config_value[kMaxS];
int main() {
  int xor_sum = 0;
  int N;
  scanf("%d", &N);
  for (int i = 1; i <= N; i++) {
    int s;
    scanf("%d", &s);
    if (!obtained[s]) {
      my_map.clear();
      config_value[s] = GetSpragueGrundy(s, 0);
      obtained[s] = true;
    }
    xor_sum ^= config_value[s];
  }
  if (xor_sum) {
    printf("NO\n");
  } else {
    printf("YES\n");
  }
  return 0;
}
