#include //#include #include #include #define rep(i, n) for(int i = 0; i < (n); i++) #define rrep(i, n) for(int i = (n-1); i >= 0; i--) using namespace std; using namespace atcoder; typedef long long ll; const int MOD = 1000000007; //const int MOD = 998244353; const ll INF = 1LL<<61; const int IINF = 1000000000; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } typedef pair PI; //typedef pair P; using mint = modint1000000007; typedef pair P; vector > prime_factorize(long long N) { vector > res; for (long long a = 2; a * a <= N; ++a) { if (N % a != 0) continue; long long ex = 0; // 指数 // 割れる限り割り続ける while (N % a == 0) { ++ex; N /= a; } // その結果を push res.push_back({a, ex}); } // 最後に残った数について if (N != 1) res.push_back({N, 1}); return res; } int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll N; cin >> N; vector M(N); rep(i,N) cin >> M[i]; vector grundy(N); rep(i,N){ vector

primes = prime_factorize(M[i]); vector nimk; for(auto prime : primes){ nimk.push_back(prime.second); } ll xor_sum = 0; for(auto n : nimk){ xor_sum ^= (n%3); } grundy[i] = xor_sum; } ll total_xor_sum = 0; for(auto g : grundy){ total_xor_sum ^= g; } if (total_xor_sum == 0){ cout << "Bob" << endl; } else{ cout << "Alice" << endl; } }