#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long int N; vector prime; map< vector, bool > wflag; bool check(vector vec) { int i, j; int size = vec.size(); bool flag = false; vector c_vec; for (i = 0; i < size; i++) { if (vec[i] > 0) c_vec.push_back(vec[i]); } sort(c_vec.begin(), c_vec.end()); c_vec.swap(vec); size = vec.size(); if (wflag.find(vec) != wflag.end()) { return wflag[vec]; } if (size == 0) return false; if (size == 1) return true; for (i = 0; i < size && !flag; i++) { c_vec.clear(); for (j = 0; j < size; j++) { c_vec.push_back(vec[j]); } for (j = 1; j <= vec[i]; j++) { c_vec[i]--; if (!check(c_vec)) { flag = true; break; } } } wflag.insert( map< vector, bool >::value_type(vec, flag) ); return flag; } int main() { long int i; cin >> N; for (i = 2; i < 50000000 && N > 1; i++) { int count = 0; while (N % i == 0) { count++; N /= i; } prime.push_back(count); } bool flag = check(prime); if (flag) cout << "Alice" << endl; else cout << "Bob" << endl; return 0; }