407429: GYM102788 G Alice And Bob

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

G. Alice And Bobtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

«Your passion for gambling will do you no good,» Bob said as he agreed to play one more game with Alice.

The rules of the game are the following: players have a set of $$$n$$$ positive integers. They take turns. During each move, the player (either Alice or Bob) must choose two subsequent numbers and divide each of them by they greatest common factor other than $$$1$$$. If one of the players is unable to make a move, he or she loses. The question is the following: who will eventually win if both players do their best? Do not forget that Alice always starts first.

Input

The first line contains a positive integer $$$n$$$ ($$$2 \le n \le 50$$$) – the initial number of elements in the set.

The second line contains $$$n$$$ positive integers separated by spaces, each of them smaller or equal to $$$10^9$$$ – elements of the set.

Output

The single line must contain the name of the winner. If Alice wins, print «Alice,» and if Bob does, print «Bob» (without quotation marks).

ExamplesInput
3
2 4 2
Output
Bob
Input
4
3 9 6 18
Output
Alice
Input
5
630 680 735 578 510
Output
Alice
Input
10
49 70 80 70 70 70 70 56 98 5
Output
Bob

加入题单

上一题 下一题 算法标签: