Hack the money
/
No tags
Problem
Editorial
Analytics

You are a bank account hacker.Initially you have 1 rupee in your account, and you want exactly N rupees in your account.You wrote two hacks, First hack can multiply the amount of money you own by 10, while the second can multiply it by 20. These hacks can be used any number of time . Can you achieve the desired amount N using these hacks.
Constraints:

1<=T<=100

1<=N<=10^12

Input ->

• The first line of the input contains a single integer T denoting the number of test cases.
• The description of T test cases follows.The first and only line of each test case contains a single integer N.

Output ->For each test case, print a single line containing the string "Yes" if you can make exactly N rupees or "No" otherwise.

SAMPLE INPUT
5
1
2
10
25
200
SAMPLE OUTPUT
Yes
No
Yes
No
Yes
Explanation

In the last case hacker can get Rs. 200 by first using 10x hack and then using 20x hack once.

1 -> 10 -> 200

Time Limit: 1.0 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB

## Contributors

Initializing Code Editor...