#include #include #include #include #include #include using ll = long long; std::map, bool> memo; bool can_win(ll a, ll b); bool can_win_mod(ll a, ll b) { if (a < b) return false; return !can_win(b, a % b); } bool can_win_minus_one(ll a, ll b) { if (a <= 0) return false; return !can_win(b, a - 1); } bool can_win(ll a, ll b) { if (a < b) { return !can_win(b, a); } if (a <= 0) { return false; } if (b <= 0) { return false; } std::pair state = {a, b}; if (memo.count(state)) { return memo[state]; } if (a >= 2 * b) { memo[state] = true; return true; } ll d = a - b; // 差值 d = a - b if (!can_win(b, d)) { memo[state] = true; return true; } ll low = 0, high = b; ll k = b; while (low <= high) { ll mid = low + (high - low) / 2; if (b - mid <= 0) { k = mid; high = mid - 1; } else { if (!can_win(b - mid, d)) { k = mid; high = mid - 1; } else { low = mid + 1; } } } memo[state] = !can_win(b - k, a - k); return memo[state]; } int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(NULL); ll a, b; std::cin >> a >> b; if (can_win(a, b)) { std::cout << "Alice" << std::endl; } else { std::cout << "Bob" << std::endl; } return 0; }