import scala.io.StdIn.readLine import scala.collection.mutable.Map @main def yuki2(): Unit = val n = readLine.toInt val factorsMap = primeFactorization(n) var ret: Int = 0 for (_, v) <- factorsMap do ret ^= v println(if ret == 0 then "Bob" else "Alice") def primeFactorization(n: Int): Map[Int, Int] = val factors = Map[Int, Int]() var num = n while num % 2 == 0 do factors(2) = factors.getOrElse(2, 0) + 1 num /= 2 var divisor = 3 while num > 1 do while num % divisor == 0 do factors(divisor) = factors.getOrElse(divisor, 0) + 1 num /= divisor divisor += 2 factors