#include #include #include #include #include using namespace std; map, bool> memo; bool can_win(long long my, long long opp) { if (my == 0) return false; if (opp == 0) return true; if (memo.count({my, opp})) { return memo[{my, opp}]; } if (my < opp) { return memo[{my, opp}] = !can_win(opp, my - 1); } if (my % opp == 0) { return memo[{my, opp}] = true; } long long remainder_result = my % opp; bool can_win_by_remainder = !can_win(opp, remainder_result); long long quotient = my / opp; if (quotient >= 2) { return memo[{my, opp}] = can_win_by_remainder; } else { bool can_win_by_subtract = (remainder_result % 2 == 0); return memo[{my, opp}] = (can_win_by_remainder || can_win_by_subtract); } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); long long A, B; cin >> A >> B; if (can_win(A, B)) { cout << "Alice" << endl; } else { cout << "Bob" << endl; } return 0; }