#include using namespace std; class Prime { private: vector div; public: Prime(long long n = 0) { for (long long i = 0; i <= n; ++i) div.emplace_back(i); for (long long i = 2; i <= n / i; ++i) if (div[i] == i) { for (long long j = i * i; j <= n; j += i) div[j] = i; } } bool isPrime(long long n) const { if (n <= 1) return false; if (n < (long long)div.size()) return div[n] == n; for (long long i = 2; i <= n / i; ++i) if (n % i == 0) return false; return true; } vector factor(long long n) const { vector res; for (long long i = 2; i <= n / i && n >= (long long)div.size(); ++i) { while (n % i == 0) { res.emplace_back(i); n /= i; } } if (n >= max((long long)div.size(), 2ll)) { res.emplace_back(n); } else { while (n > 1) { res.emplace_back(div[n]); n /= div[n]; } } sort(res.begin(), res.end()); return res; } vector primeFactor(long long n) const { vector res; for (long long i = 2; i <= n / i && n >= (long long)div.size(); ++i) { if (n % i) continue; res.emplace_back(i); while (n % i == 0) n /= i; } if (n >= max((long long)div.size(), 2ll)) { res.emplace_back(n); } else { while (n > 1) { long long d = div[n]; res.emplace_back(d); while (n % d == 0) n /= d; } } sort(res.begin(), res.end()); return res; } vector divisor(long long n) const { vector res; for (long long i = 1; i <= n / i; ++i) { if (n % i == 0) { res.emplace_back(i); if (i != n / i) res.emplace_back(n / i); } } sort(res.begin(), res.end()); return res; } }; template class Grundy { private: map grundy; public: int solve(T t) { if (grundy.count(t)) return grundy[t]; set s; for (auto g : t.next()) s.insert(solve(g)); for (int i = 0; ; ++i) { if (s.count(i) == 0) return grundy[t] = i; } } template int solve(S s) { int g = 0; for (auto t : s) g ^= solve(t); return g; } }; Prime prime; class State { private: int n; public: State() {} State(int n) : n(n) {} vector next() { auto factor = prime.primeFactor(n); vector res; for (auto i : factor) { res.emplace_back(n / i); if (n / i % i == 0) res.emplace_back(n / i / i); } return res; } bool operator<(const State& state) const { return n < state.n; } }; int main() { int n; cin >> n; vector m(n); for (auto& i : m) { int j; cin >> j; i = j; } Grundy grundy; cout << (grundy.solve(m) ? "Alice" : "Bob") << endl; }