Files
PAT/html/a1132.html
T

26 lines
1.0 KiB
HTML

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<h1>1132. Cut Integer (20)</h1>
<div id="problemContent">
<p>Cutting an integer means to cut a K digits long integer Z into two integers of (K/2) digits long integers A and B. For example, after cutting Z = 167334, we have A = 167 and B = 334. It is interesting to see that Z can be devided by the product of A and B, as 167334 / (167 x 334) = 3. Given an integer Z, you are supposed to test if it is such an integer.
</p>
<p><b>
Input Specification:
</b></p>
<p>Each input file contains one test case. For each case, the first line gives a positive integer N (&lt;= 20). Then N lines follow, each gives an integer Z (10&lt;=Z&lt;=2<sup>31</sup>). It is guaranteed that the number of digits of Z is an even number.</p>
<p><b>
Output Specification:
</b></p>
<p>For each case, print a single line "Yes" if it is such a number, or "No" if not.</p>
<b>Sample Input:</b><pre>
3
167334
2333
12345678
</pre>
<b>Sample Output:</b><pre>
Yes
No
No
</pre>
</div>