// Check Overflow #ifdef DEBUG_BUILD #define _GLIBCXX_DEBUG #endif // include #include // Debugger #ifdef DEBUG_BUILD #include "debugger.hpp" #else #define debug(...) #define debugdo(...) #define debugtab(...) #endif // for alias #define range(i, A, B) for (ll i = (ll)(A); i < (ll)(B); i++) #define rep(i, N) range(i, 0, N) #define rrep(i, N) for (ll i = (ll)(N)-1; i >= 0; i--) // type alias using namespace std; using ll = long long; using ld = long double; using pll = std::pair; template using vec = std::vector; template using vec2 = std::vector>; template using vec3 = std::vector>; template using priority_greater_queue = priority_queue, greater>; // number alias constexpr int MOD = 1000000007; constexpr ll INFL = std::numeric_limits::max() / 4; constexpr array DX = {1, 0, -1, 0}; constexpr array DY = {0, 1, 0, -1}; // new vector template vec2 newVec2(size_t A, size_t B, ll a = T()) { return vec2(A, vec(B, a)); } template vec3 newVec3(size_t A, size_t B, size_t C, ll a = T()) { return vec3(A, vec2(B, vec(C, a))); } // vector input template std::istream &operator>>(std::istream &is, std::vector &data) { for (T &in : data) { is >> in; } return is; } // functions template bool chmax(T &a, const T b) { if (a < b) { a = b; return true; } return false; } template bool chmin(T &a, const T b) { if (a > b) { a = b; return true; } return false; } template T pow(T x, T n) { T ret = 1; while (n > 0) { if (n & 1) ret *= x; x *= x; n >>= 1; } return ret; } /*****/ // 素因数分解する O(sprt(n)) vector> prime_factorize(long long n) { vector> res; for (long long i = 2; i * i <= n; ++i) { if (n % i != 0) continue; long long ex = 0; // 指数 while (n % i == 0) { ++ex; n /= i; } res.push_back({i, ex}); } if (n != 1) res.push_back({n, 1}); return res; } void Main() { ll N; cin >> N; vec M(N); cin >> M; ll grundy = 0; rep(i, N) { auto F = prime_factorize(M[i]); ll g = 0; rep(j, F.size()) { g ^= F[j].second % 3; } grundy ^= g; } cout << (grundy != 0 ? "Alice" : "Bob") << endl; } /*****/ int main() { cin.tie(nullptr); ios::sync_with_stdio(false); std::cout << std::fixed << std::setprecision(10); std::cerr << std::fixed << std::setprecision(10); Main(); std::cout << std::flush; std::cerr << "--end--" << std::flush; return 0; }