This time Alice and Bob have devised a new game of numbers to decide who is the better player among the two. Each time they are given n positive integers and they perform an operation on these integers in each turn. In a particular operation a player can choose any 1 of the numbers and divide it with 1 or more prime numbers either once or more than one times. In a particular turn 12 can be reduced to any of the following -
1)122=6
2)122=6,62=3
3)123=4
4)122=6,63=2
5)122=6,62=3,33=1
Once a number is reduced to 1 it is discarded.
If in a particular turn a player is not able to make any move than he loses. Assuming both will play optimally well and Alice will start first, you have to tell who will win the game. Input-
First line contains an integer n denoting number of integers. 2nd line contains n integers Ai
Output-
If Alice wins output should be "ALICE" If Bob wins output should be "BOB"
Constraints-
1≤n≤100000
1≤Ai≤100000
Sample Input (Plaintext Link)
4
1 2 3 4
Sample Output (Plaintext Link)
ALICE
Explanation
On factorizing 1,2,3 and 4 we have- 1 cannot be divided further.
2=21
3=31
4=22
In first turn Alice picks 4 and divides it by 2 twice. Which reduces it to 1. It is discarded now.
In second turn Bob picks either 2 or 3 and divides it by number itself. It reduces to 1.
Now Alice has just 1 option left either (2 or 3) .
Now all the numbers are reduced to 1 and BOB has no possible operation to perform. Hence he loses.
Time Limit: 1 sec(s) for each input file. Memory Limit: 256 MB Source Limit: 1024 KB Scoring: Score is assigned in case any testcase passes.