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)


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

hide comments
2015-08-06 09:04:46 Vishal Pandey
Same solution accepted in C++,but not in C.What shit is this?
2015-07-30 13:48:13
the worst english i have ever seen
2015-07-20 08:26:33 ANIKET
don't try this question in C
2015-07-14 10:23:54 :.Mohib.:
Got Ac... Nice Logic... thnx for your reply @lakshman...
2015-07-14 01:58:18 :.Mohib.:
What complexity expected?? Some pre calculation+log(n) per query giving tle... :(
2015-07-06 16:13:24 Shivam Singh
the root condition should be enough, but it is accepting only if i check root+1 also, in C
why is it so?
2015-05-28 19:49:41 `Ak
u need to rejudge all the solution as my firstly accepted solution isn't giving ac now :)
2015-05-27 17:20:03 biswas
Check also for (root-1) and (root+1) in C. Otherwise you will get WA.
2015-05-22 19:07:08 Archit Joshi
Runtime error
whyyyy
2015-05-21 19:09:36 ASHUTOSH DWIVEDI
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
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.