TTHLSS - Mr Toothless and His Task

Mr. Toothless is very good at math. But this time he feels bored at Hiccup. Because he has given a boring task to Toothless. The task is:

Given m. Is it possible to write m as multiplication of three consecutive numbers? i.e. is it possible to write m=n(n+1)(n+2) where n>0. As for example 504=7*8*9. Help Toothless.

Input

Input starts with an integer T (≤ 100), denoting the number of test cases.

Each case contains one integer m (1<=m<=1018)

Output

For each case, print the case number and “Yes” if it is possible, print “No” otherwise.

Sample Input

Output for Sample Input

2
504
505

Case 1: Yes
Case 2: No

 Problem Setter: Md Abdul Alim, Dept. of Computer Science, Bangladesh University of Business & Technology


Added by:Alim
Date:2014-03-25
Time limit:2s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64 GOSU

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.