#include using namespace std; const int N = 110; int n; int f[N]; int res; int sg(int x) { if (~f[x]) return f[x]; unordered_set S; // 所有能到的局面 for (int i = 0; i < x; i++) for (int j = 0; j <= i; j++) S.insert(sg(i) ^ sg(j)); for (int i = 0;; i++) if (!S.count(i)) return f[x] = i; } int main() { // 初始化 memset(f, -1, sizeof f); cin >> n; while (n--) { int x; cin >> x; res ^= sg(x); } if (res) puts("Yes"); else puts("No"); return 0; }