8858: [yosupo] Number Theory - Factorize
[Creator : ]
Description
Given $Q$ cases. For each case, given integer $a_i$. Please factorize it.
Input
$Q$
$a_0$
$a_1$
:
$a_{Q - 1}$
$a_0$
$a_1$
:
$a_{Q - 1}$
Output
Print $Q$ lines. For each line, print as follows. $k$ is the number of factors and $x_i$ is the factors in __ascending__ order.
$k$ $x_0$ $x_1$ ... $x_{k - 1}$
$k$ $x_0$ $x_1$ ... $x_{k - 1}$
Constraints
- $1 \leq Q \leq 100$
- $1 \leq a_i \leq 10^{18}$
- $1 \leq a_i \leq 10^{18}$
Sample 1 Input
10
1
2
3
4
5
6
7
8
9
10
Sample 1 Output
0
1 2
1 3
2 2 2
1 5
2 2 3
1 7
3 2 2 2
2 3 3
2 2 5