| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 256 MB | 35 | 9 | 8 | 25.806% |
Let us define function $S$: $\mathbb{N} \rightarrow \mathbb{N}$ in the following way: $S(x)$ is the minimum number for which there exists an increasing sequence of integers $x = t_{1} < t_{2} < \ldots < t_{k} = S(x)$ such that $t_{1} \cdot t_{2} \cdot \ldots \cdot t_{k}$ is a square of some integer. For example, $S(2) = 6,ドル $S(3) = 8,ドル $S(4) = 4$.
Given $y,ドル find all such $x$ that $S(x)=y$.
The only line of input contains a single integer $y$ (1ドル \le y \le 10^{6}$).
On the first line, print the number of solutions. On the second line, list all solutions in increasing order separated by spaces.
4
1 4
5
0
6
1 2
$\mathbb{N}$ is the set of positive integers.