P9063 [yLOI2023] Decomposing “Zhi Factors”

Description

Given a positive integer $n$, factorize $n$ into prime factors. Let $n = p_1 \times p_2 \times p_3 \times \dots \times p_x$, where each $p_i$ is a prime number. If all $p_i$ are odd, then $n$ is called a “Zhi Factor Number” (“只因数”). Now, given several values of $n$, determine whether $n$ is a “Zhi Factor Number”.

Input Format

**This problem contains multiple groups of testdata within a single test case.** The first line contains an integer $T$, the number of testdata groups. The next $T$ lines each contain an integer $n$, representing one group of data.

Output Format

For each group of data, output one string per line. If $n$ is a “Zhi Factor Number”, output `Yes`; otherwise output `No`.

Explanation/Hint

### Constraints There are $10$ test points in total. For the $i$-th test point, $T = \max(1, i - 1)$. - For $30\%$ of the data, $n \leq 3$. - For $50\%$ of the data, $n \leq 10$. - For another $10\%$ of the data, $n$ is odd. - For another $10\%$ of the data, $n$ is even. - For $90\%$ of the data, $n \leq 10^9$. - For $100\%$ of the data, $1 \leq T \leq 9$, $2 \leq n \leq 10^{18}$. ### Notes There are two additional sample files for this problem. See `ibvl.zip` in the attachments. Translated by ChatGPT 5