Alice and Bob's Number Game
Alice and Bob are playing a number game. Alice picks a positive integer a, and Bob picks a positive integer b. They then repeatedly apply the following operation until both numbers become equal:
- Compute g = gcd(a, b)
- Compute d = min(a, b) − g
- Compute h = gcd(g, d) (where gcd(g, 0) = g)
- Set both a and b to h
Once the numbers are equal, the game ends. Alice wins if the final number is odd; Bob wins if it's even.
Given a and b, determine who wins the game.
Input
The first line contains the number of test cases t (1 ≤ t ≤ 10^5).
Each test case contains two positive integers a and b (1 ≤ a, b ≤ 10^9).
Output
For each test case, output "Alice" if Alice wins, or "Bob" if Bob wins.
Notes
The winner is determined solely by the final number's parity after the game process converges.