406322: GYM102361 D Decimal
Memory Limit:1024 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
D. Decimaltime limit per test1 secondmemory limit per test1024 megabytesinputstandard inputoutputstandard output
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.
InputThe first line contains one positive integer $$$T~(1\le T\le 100)$$$, denoting the number of test cases.
For each test case:
Input a single line containing a positive integer $$$n~(1\le n\le 100)$$$.
OutputOutput $$$T$$$ lines each contains a string "Yes" or "No", denoting the answer to corresponding test case.
ExampleInput2 5 3Output
No YesNote
$$$\frac{1}{5} = 0.2$$$, which is a finite decimal.
$$$\frac{1}{3} = 0.333\cdots$$$, which is an infinite decimal.