#K1391. Divisor Game Winning Strategy

    ID: 24017 Type: Default 1000ms 256MiB

Divisor Game Winning Strategy

Divisor Game Winning Strategy

In this problem, you are given an integer N. Two players take turns playing a game, where in each move a prime factor of N is removed (i.e. the number is divided by one of its prime factors). The total number of moves in the game is equal to the total number of prime factors of N (with multiplicity). Paul (the first player) wins if the number of moves is odd, and loses if it is even.

The result is determined by the parity of the number of prime factors. In other words, if we let k be the number of prime factors of N, then the result is: $$ \text{result} = \begin{cases} \text{YES}, & \text{if } k \equiv 1 \pmod{2},\\ \text{NO}, & \text{if } k \equiv 0 \pmod{2}. \end{cases} $$

For each test case, output the answer in the format "Case #i: RESULT", where i is the test case number (starting from 1) and RESULT is either YES or NO.

inputFormat

The input is read from standard input (stdin). The first line contains an integer T, the number of test cases. Each of the next T lines contains a single integer N representing a game starting number.

outputFormat

For each test case, print a line to standard output (stdout) in the following format: "Case #i: RESULT", where i is the test case number (starting from 1) and RESULT is either "YES" if the number of prime factors of N (counted with multiplicity) is odd, or "NO" if it is even.

## sample
3
18
10
17
Case #1: YES

Case #2: NO Case #3: YES

</p>