#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:64000000")
using namespace std;
const int inf = (int)1e9;
const int mod = inf + 7;
const double eps = 1e-9;
const double pi = acos(-1.0);
int dp[100];
int main() {
  dp[1] = 1;
  dp[2] = 1;
  dp[3] = 2;
  dp[4] = 2;
  dp[5] = 2;
  dp[6] = 3;
  dp[7] = 3;
  dp[8] = 3;
  dp[9] = 3;
  dp[10] = 4;
  dp[11] = 4;
  dp[12] = 4;
  dp[13] = 4;
  dp[14] = 4;
  dp[15] = 5;
  dp[16] = 5;
  dp[17] = 5;
  dp[18] = 5;
  dp[19] = 5;
  dp[20] = 5;
  dp[21] = 6;
  dp[22] = 6;
  dp[23] = 6;
  dp[24] = 6;
  dp[25] = 6;
  dp[26] = 6;
  dp[27] = 6;
  dp[28] = 7;
  dp[29] = 7;
  dp[30] = 7;
  dp[31] = 7;
  dp[32] = 7;
  dp[33] = 7;
  dp[34] = 7;
  dp[35] = 7;
  dp[36] = 8;
  dp[37] = 8;
  dp[38] = 8;
  dp[39] = 8;
  dp[40] = 8;
  dp[41] = 8;
  dp[42] = 8;
  dp[43] = 8;
  dp[44] = 8;
  dp[45] = 9;
  dp[46] = 9;
  dp[47] = 9;
  dp[48] = 9;
  dp[49] = 9;
  dp[50] = 9;
  dp[51] = 9;
  dp[52] = 9;
  dp[53] = 9;
  dp[54] = 9;
  dp[55] = 10;
  dp[56] = 10;
  dp[57] = 10;
  dp[58] = 10;
  dp[59] = 10;
  dp[60] = 10;
  int n, x;
  int ans = 0;
  scanf("%d", &n);
  while (n--) {
    scanf("%d", &x);
    ans ^= dp[x];
  }
  if (ans == 0)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
