import Control.Applicative import Data.List import Data.Bits import Data.Array factors :: Int -> [Int] factors n = [x | x <- [1..n], n `mod` x == 0] factorization :: Int -> [Int] factorization 1 = [] factorization x = v : factorization (x `div` v) where v = (factors x) !! 1 mex :: [Int] -> Int mex list = mex_sub 0 $ sort list where mex_sub n [] = n mex_sub n (x:xs) | n == x = mex_sub (n+1) xs | otherwise = n grundy :: Int -> Int grundy 0 = 0 grundy 1 = 1 grundy n = mex [dp!!(n-1),dp!!(n-2)] dp :: [Int] dp = [grundy i | i <- [0..]] factexpcnt n = map length $ groupBy (\ a b -> a==b) $ factorization n main = do getLine m <- map (read::String->Int) <$> words <$> getLine putStrLn $ if (foldl1 xor [dp!!i | i<-concatMap factexpcnt m]) /= 0 then "Alice" else "Bob"