题目描述
Problem Description
There are $ N $ piles of stones, each pile numbered from $ 1 $ to $ N $. The number of stones in pile $ i $ is $ a_i $. Additionally, $ N $ numbers $ b_i $ are given. Alice and Bob play a game. Alice starts and they alternate turns, with the player who cannot make a move losing the game.
- Choose a pile of stones $ i $. Choose a non-negative integer $ k $ and remove $ b_i^k $ stones from pile $ i $. The number of stones after removal must not be negative.
When both players play optimally, who will win?
Input Format
The input is given from the standard input in the following format:
$ N $ $ a_1 $ $ b_1 $ $ a_2 $ $ b_2 $ $\vdots$ $ a_N $ $ b_N $
Output Format
Output Alice if Alice wins, or Bob if Bob wins, in one line.
Sample Input and Output
Sample Input #1
2
10 3
7 4
Sample Output #1
Bob
Sample Input #2
16
903 5
246 38
884 12
752 10
200 17
483 6
828 27
473 21
983 35
953 36
363 35
101 3
34 23
199 8
134 2
932 28
Sample Output #2
Alice
Sample Input #3
16
35 37
852 17
789 37
848 40
351 27
59 32
271 11
395 20
610 3
631 33
543 14
256 28
48 8
277 24
748 38
109 40
Sample Output #3
Bob
Notes/Hints
Constraints
- $1 \leq N \leq 10^5$
- $1 \leq a_i, b_i \leq 10^9$
- All inputs are integers
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分
样例输入
2
10 3
7 4
样例输出
Bob