As everyone knows, Cirno's favorite number is $$$9$$$!
Today, Cirno gets a positive integer $$$x$$$. She suddenly wonders: can she find another positive integer $$$k$$$ such that their product $$$x \cdot k$$$ becomes a number whose every digit is $$$9$$$ (for example, $$$9$$$, $$$99$$$, $$$999999$$$, and so on)?
The input contains multiple test cases.
The first line contains an integer $$$t$$$ ($$$1 \le t \le 10^4$$$), denoting the number of test cases.
For each test case, the first line contains a positive integer $$$x$$$ $$$(1 \le x \le 10^{12})$$$.
It is guaranteed that the sum of all $$$x$$$ over a single test file does not exceed $$$10^{12}$$$.
For each test case:
If there exists an integer $$$k$$$ satisfying the condition, output YES on a single line.
Otherwise, output NO on a single line.
You may print the answer in any letter case. For example, the strings yEs, yes, and Yes will all be accepted as affirmative answers.
4310712
YES NO YES NO
| Name |
|---|


