#P6734. Decimal
Decimal
Problem Description
Given a positive integer n, determine if $\frac{1}{n}$ is an infinite decimal in decimal base. If the answer is yes, print “Yes” in a single line, or print “No” if the answer is no.
Input
The first line contains one positive integer T (1 ≤ T ≤ 100), denoting the number of test cases.
For each test case:
Input a single line containing a positive integer n (1 ≤ n ≤ 100).
Output
Output T lines each contains a string “Yes” or “No”, denoting the answer to corresponding test case.
2
5
3
No
Yes
Hint
1/5 = 0.2, which is a finite decimal.
1/3 = 0.333 · · · , which is an infinite decimal.