#include using namespace std; #define rep(i,a,b) for(int i=a;i enumpr(int n) { map V; for (int i = 2; i*i <= n; i++) while (n%i == 0) V[i]++, n /= i; if (n>1) V[n]++; return V; } vector enumdiv(int n) { vector S; for (int i = 1; i*i <= n; i++) if (n%i == 0) { S.push_back(i); if (i*i != n) S.push_back(n / i); } sort(S.begin(), S.end()); return S; } int N; int M[1010]; //----------------------------------------------------------------- int nim(int x) { auto v = enumpr(x); set g; for (auto p : v) { g.insert(nim(x / p.first)); if(2 <= p.second) g.insert(nim(x / p.first / p.first)); } int ret = 0; for (int i : g) if (ret == i) ret++; return ret; } int main() { cin >> N; rep(i, 0, N) scanf("%d", &M[i]); int a = 0; rep(i, 0, N) a ^= nim(M[i]); if (a != 0) printf("Alice\n"); else printf("Bob\n"); }