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
Y N Y Y
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.