TIPTOP - Tip Top Game


Alim and Sufian are two good friends. They love playing a game with numbers, and recently, they discovered a new game called “Tip Top”. The rule of the game is they took a number (N) randomly, after that they find all divisors of N. Then they starting to play the game first Alim took a divisor, then Sufian so on. The person who took the last divisor will win the game.

Every time the game started with Alim. Now Alim wants to know when he will win.

As you a good programmer your task is to find will Alim win or not.

Input

Input starts with an integer T (T ≤ 105), denoting the number of test cases. Each case starts with a line containing an integer N (1 ≤ N ≤ 1018) the number.

Output

For each case you have to print “Yes” if Alim will win otherwise “No” with case number. See the sample for exact formatting.

Sample

Input:
2
4
5

Output:
Case 1: Yes
Case 2: No

Problem setter: Ajharul Islam Barid, Dept. of CSE

Bangladesh University of Business and Technology (BUBT)


hide comments
Vishal Pandey: 2015-08-06 09:04:46

Same solution accepted in C++,but not in C.What shit is this?

udaykanthreddy: 2015-07-30 13:48:13

the worst english i have ever seen

ANIKET: 2015-07-20 08:26:33

don't try this question in C

:.Mohib.:: 2015-07-14 10:23:54

Got Ac... Nice Logic... thnx for your reply @lakshman...

:.Mohib.:: 2015-07-14 01:58:18

What complexity expected?? Some pre calculation+log(n) per query giving tle... :(

Shivam Singh: 2015-07-06 16:13:24

the root condition should be enough, but it is accepting only if i check root+1 also, in C
why is it so?

`Ak: 2015-05-28 19:49:41

u need to rejudge all the solution as my firstly accepted solution isn't giving ac now :)

biswas: 2015-05-27 17:20:03

Check also for (root-1) and (root+1) in C. Otherwise you will get WA.

Archit Joshi: 2015-05-22 19:07:08

Runtime error
whyyyy

ASHUTOSH DWIVEDI: 2015-05-21 19:09:36

same code gives ac in c++4.3 but wa in c...as well as in c++4.9

Last edit: 2015-07-05 23:03:01

Added by:Shipu Ahamed
Date:2013-09-18
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64