Ishaan wants to be a master in maths. His teacher selects a lot of problems and asks Ishaan to solve those. Every problem has a difficulty level associated with it. Ishaan can solve only those problems whose difficulty level follows a certain pattern.
Given the difficulty of a problem, N, find out whether he can solve the problem or not.
2841 Not Solved
101 Not Solved
First line of input contains a single integer T denoting the number of test cases.
The only line of each test case contains an integer N.
For each test case, print "1" if the problem can be solved by Ishaan, else print "0" (without quotes "") in a new line.
1 <= T <= 100
1 <= N <= 10^12
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.