Gambling Stark
Submissions: 564   Accuracy:

25.88%

  Difficulty: Easy   Marks: 2

Tony Stark ( Iron Man ) is a fun loving and a responsible avenger too. After fighting the civil war, he needs rest and needs to fresh up his mind. So he makes up his mind to go to a casino and play. When he reaches there, he finds out people are mad for a gambling on numbers game named as "BAAZI". Tony being an observant guy tries to observe the pattern in numbers. Like someone who gambled on 4 ,  6 , 12  , 18 , 30 , 42 , 198  won  the game  whereas the one who gambled on 1 , 2 , 3 , 5 , 7 , 8 , 9 , 10 , 11, 13 ... lost all his money. You have to help Tony play this game, by telling him whether he should play on the number he ( Tony ) decided to.

Input: The first line of the input contains an integer T denoting the number of test cases. The description of each testcase follows. Each test case contains a single line with 1 integer ' X ' on which Tony wants to play.


Output:  For each test case output a new line with ' Y ' to yes he should play on the given number and ' N ' for no he should'nt play on the given number .


Constraints:  1 <= T <= 10000
                     2 <= X <=5 * 10^3


Example:   

Input:
4
102
95
72
60

Output:

Y
N
Y
Y

 

Explanation:
In the first testcase contains the number 102 ,  which means we have to find whether Tony should gamble on 102  given number or not  .

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Diksha Singhal
Author: diksha1812


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.