#include using namespace std; using int64 = long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int64 A, B; cin >> A >> B; // We want to compute win(A,B) for the symmetric "mod‐only" Euclid game: // win(a,b) = true if current player to move wins, // false otherwise. // // Recurrence (assume a>=b>0, swap if necessary): // let q = a/b, r = a%b. // if r==0 → current makes it zero and WINS // else if q>=2 → forced mod (only move) still drops into a losing position ⇒ current LOSES // else (q==1) → only move is (b,r), and turn passes ⇒ win(a,b) = !win(b,r) // // We can unroll that with an iterative loop + a single boolean flip. int64 a = A, b = B; bool rev = false; // how many ! flips we’ve done along the way bool ret = false; // what the base‐case returns while (true) { if (a < b) swap(a, b); // now a >= b int64 q = a / b; int64 r = a % b; if (r == 0) { // current can reduce a to 0 immediately ret = true; break; } if (q >= 2) { // forced mod lands us in a winning position for the *next* player, // so current loses ret = false; break; } // q == 1 and r > 0: only move is (a,b) -> (b,r), turn flips a = b; b = r; rev = !rev; } // if we flipped an odd number of times, we invert ret bool win0 = rev ? !ret : ret; cout << (win0 ? "Alice\n" : "Bob\n"); return 0; }