Problem: Let's call a number a binary decimal if it is a positive integer and all digits in its decimal notation are either or . For example, is a binary decimal, while and are not.
Given a number , you are asked whether or not it is possible to represent as a product of some (not necessarily distinct) binary decimals.
Input Format: The first line contains a single integer () — the number of test cases.
The only line of each test case contains a single integer ().
Output Format: For each test case, output "YES" (without quotes) if can be represented as a product of binary decimals, and "NO" (without quotes) otherwise.
You can output "YES" and "NO" in any case (for example, strings "yES", "yes", and "Yes" will be recognized as a positive response).
Note: The first five test cases can be represented as a product of binary decimals as follows:
- .
- is already a binary decimal.
- .
- .
- is already a binary decimal.