#include #include #include using namespace std; template map primefactor(T n) { map ret; for (T i = 2; i * i <= n; i++) { if (n%i!=0) continue; T temp = 0; while (n % i == 0) { temp++; n /= i; } ret[i] = temp; } if (n != 1) ret[n] = 1; return ret; } int main() { int N; cin >> N; int M[N]; for (int i = 0; i < N; i++) { cin >> M[i]; } int ans = 0; for (auto m : M) { map p_fac = primefactor(m); int sum_xor = 0; for (auto p : p_fac) { int g = p.second % 3; sum_xor ^= g; } ans ^= sum_xor; } if (ans) { cout << "Alice" << endl; } else { cout << "Bob" << endl; } }