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.
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.
For each test case, output YES if it is possible to pay, otherwise output NO.
33314469
YES YES NO
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.