AT_arc220_a [ARC220A] Sum of Reciprocals of Squares
Description
You are given a positive integer $ N $ .
Determine whether there exists a sequence of positive integers $ A=(A_1,A_2,\ldots,A_N) $ satisfying all of the following conditions, and if so, find one such sequence.
- $ 1\le A_i\le 10^6 $
- $ \displaystyle \sum_{i=1}^N \frac1{A_i^2}=1 $
You are given $ T $ test cases; solve each of them.
Input Format
The input is given from Standard Input in the following format:
> $ T $ $ \text{case}_1 $ $ \text{case}_2 $ $ \vdots $ $ \text{case}_T $
Each test case is given in the following format:
> $ N $
Output Format
Output the answers for the test cases in order, separated by newlines.
For each test case, if no $ A $ satisfying all conditions exists, output `No`.
If an $ A $ satisfying all conditions exists, output it in the following format:
> Yes $ A_1 $ $ A_2 $ $ \ldots $ $ A_N $
If multiple $ A $ satisfying all conditions exist, any of them will be accepted.
Explanation/Hint
### Sample Explanation 1
Consider the first test case.
For $ A=(2,2,2,2) $ , we have $ \displaystyle \sum_{i=1}^N\frac1{A_i^2}=\frac14+\frac14+\frac14+\frac14=1 $ , so we can confirm that the conditions are satisfied.
### Constraints
- $ 1\le T\le 500 $
- $ 1\le N\le 10^5 $
- The sum of $ N $ over all test cases is at most $ 10^5 $ .
- All input values are integers.