Difficult Problems
##### Submissions: 338   Accuracy: 28.98%   Difficulty: Easy   Marks: 2

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.
N    Result
1126    Solved
2841    Not Solved
33        Solved
876      Solved
.
.
.
101      Not Solved

Input :
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.

Output :
For each test case, print "1" if the problem can be solved by Ishaan, else print "0" (without quotes "") in a new line.

Constraints :
1 <= T <= 100
1 <= N <= 10^12

Example :
Input :

5
1126
2841
33
876
101
Output :
1
0
1
1
0

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

Author: goyalanubhav11

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.