NITT2  hai jolly jolly jolly
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 <= 10^{50000}).
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
vivek_dwivedi:
20180705 12:05:40
0.01 sec ;) 

anuj0503:
20160617 14:02:06
A number is divisible by a composite number iff it is divisible by the highest power of each of its prime factors e.g., we can check for divisibility by 252 (252=2^2*3^2*7) by checking for divisibility by 4, 9 and 7 Last edit: 20160617 14:02:35 

ragwave:
20160522 14:58:37
well the question can be done without using divisibility tests!! 

minhthai:
20160128 16:37:23
dont bruteforce :) 

shantanu tripathi:
20150813 21:35:57
should be moved to tutorials... 

i_am_looser:
20150527 21:16:46
easy ;) Last edit: 20150527 21:17:02 

Vaporeon:
20150523 23:09:04
TLE in python 2.7.9.. AC in PYPY :P 

thelazycoder:
20150215 22:32:46
how to store 10^50000


Rajat (1307086):
20150120 03:19:52
nostalgic!!!


Ranjan Kumar Singh:
20150120 03:19:52
time limit is too high .5 is more than enough for this problem 
Added by:  jack(chakradarraju) 
Date:  20120929 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 