E. Magical Coins
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

In a magical land, the currency is based on certain $$$denominations$$$. These $$$denominations$$$ (coins) are of the order $$$11,111,1111,11111,...$$$ and so on.

Gopal has bought an item, determine if it is possible for him to pay with the help of these coins.

He can use any coin $$$any$$$ number of times.

Input

The input consists of multiple test cases.

The first line contains a single integer $$$t$$$ ($$$1 \le t \le 10^4$$$) — The number of test cases.

Each test case $$$t$$$ contains a single integer $$$n$$$ ($$$1 \le n \le 10^9$$$) — Cost of the item.

Output

For each test case, output YES if it is possible to pay, otherwise output NO.

Example
Input
3
33
144
69
Output
YES
YES
NO
Note

For $$$n = 33$$$, Gopal can use three coins of $$${11}$$$ ,so the output is YES.

For $$$n = 144$$$, Gopal can use one $$$\textbf{coin}$$$ of $$${111}$$$ and three coins of $$${11}$$$ to make 144, so the output is YES.

For $$$n = 69$$$, no combination is possible, so the output is NO.