NITT2 - hai jolly jolly jolly

no tags 

Alp and Gaut are like always opposite to each other. Once Alp told that he can identify a number which is divisible by 252 (He knows because that is his girlfriends birthday - 25/2). Now to come up against Alp, Gaut said he can identify whether the number is divisible by 525 (poor Gaut don't have a girl friend though). The truth is they don't know to do it for big numbers. So you are here to help them with a method. Given a number you have to tell whether the number is divisible by 252 and 525.

Input

Number of testcases in first line, T (T <= 100).

Each line contains one number N, whose divisibility is to be tested (1 <= N <= 1050000).

Output

Each line containing two Yes/No. one for 252 and one for 525.

Example

Input:
4
252
525
16884
21347

Output:
Yes No
No Yes
Yes No
No No

hide comments
Shivam Agarwal: 2015-01-20 03:19:52

Can anyone give me any tricky case I might be missing out... I am getting WA

Andy: 2015-01-20 03:19:52

weak test case!

Last edit: 2012-10-15 09:11:46
aristofanis: 2015-01-20 03:19:52

getting TLE with python. Any suggestions?

numerix: 2015-01-20 03:19:52

Actual TL is okay even for slower languages.

Aditya Pande: 2015-01-20 03:19:52

cant we have different time limits for different languages otherwise C has an upper hand

Mitch Schwartz: 2015-01-20 03:19:52

I don't see the interest in this problem when we already have PUCMM025.

:D: 2015-01-20 03:19:52

Really enough with absurd time limits. It's been discussed a thousand times over. Times under 1s definitively block many scripting languages.

Aditya Pande: 2015-01-20 03:19:52

the time limit is too high

it can be done within 0.1 second with slight optimizations


Added by:jack(chakradarraju)
Date:2012-09-29
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64