Euler's Problem

No attempts yetTime limit1sMemory limit128 MB

Problem

Leonhard Euler (1707-1783) was a great mathematician. This problem uses one of the functions named after him, the Euler φ\varphi function.

For a natural number nn, the value of φ\varphi at nn is the count of numbers kk (1kn1 \le k \le n) that are coprime to nn. Two numbers are coprime when they have no common divisor greater than 11. For example φ(6)=2\varphi(6) = 2, because 11 and 55 are coprime to 66 while 22, 33, 44 and 66 are not.

Had Euler lived on, he might have posed this: for a given natural number nn, find every natural number xx that satisfies φ(x)=n\varphi(x) = n.

Input

The first line contains one natural number tt (1t51 \le t \le 5), the number of data sets. Each of the next tt lines describes one data set and holds a single natural number nn (1n10101 \le n \le 10^{10}).

Output

Print the answers for the data sets in the order they appear in the input. The answer for one data set takes two lines. The first line holds the number of solutions. The second line holds every solution of the equation in increasing order. When the equation has no solution, leave the second line of that data set's answer empty.