#K4841. Prime and Perfect Square Game

    ID: 28414 Type: Default 1000ms 256MiB

Prime and Perfect Square Game

Prime and Perfect Square Game

In this game, two players, Alice and Bob, take turns removing tokens from a pile initially containing n tokens.

Alice always starts the game and on her turn she may remove any prime number of tokens (where a prime is a positive integer greater than 1 that has no divisors other than 1 and itself). Bob plays next, and on his turn he may remove any perfect square number of tokens (i.e. numbers of the form \( k^2 \) for some positive integer \( k \)). The players continue alternating turns. If at a player's turn there is no valid move (i.e. the number of tokens remaining is less than the smallest valid move for that player), then that player loses and the other wins.

For example, when \( n = 10 \):

  • Alice can remove 7 (since 7 is prime), leaving 3 tokens.
  • Bob then removes 1 (since 1 is \(1^2\)), leaving 2 tokens.
  • Alice removes 2 (prime) and wins.

Your task is to determine the winner, assuming both players play optimally using the strategy of removing the largest allowed move available on their turn.

inputFormat

The input consists of a single integer \( n \) (\( 0 \leq n \leq 10^6 \)) representing the number of tokens at the start of the game.

outputFormat

Output the name of the winner: either Alice or Bob.

## sample
1
Bob

</p>