Given an integer, check whether it is Bleak or not.

A number ‘n’ is called Bleak if it cannot be represented as sum of a positive number x and set bit count in x, i.e., x + countSetBits(x) is not equal to n for any non-negative number x.

Examples :

```
3 is not Bleak as it can be represented
as 2 + countSetBits(2).
4 is t Bleak as it cannot be represented
as sum of a number x and countSetBits(x)
for any number x.
```

**Input:**

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line. The first line of each test case contains a single integer N to be checked for Bleak.

**Output:**

Print "1" or "0" (without quotes) depending on whether the number is Bleak or not.

**Constraints:**

1 <= T <= 1000

1 <= N <= 10000

**Example:**

**Input**:

3

4

167

3

**Output**:

1

0

0

surya jeet singh | 205 |

tech_devil | 188 |

mvsaichaitanya | 164 |

shubham001 | 137 |

Utkarsh_chaudhary | 127 |

Anurag_Singh | 677 |

satyam singh 9 | 550 |

dev_v2 | 528 |

Aman Patel | 478 |

FortisFortunaAdiuvat | 472 |

akhayrutdinov | 4777 |

Quandray | 4050 |

sanjay05 | 3668 |

Ibrahim Nash | 3664 |

surbhi_7 | 2816 |