题目描述
Problem Description
Given integers \( N \) and \( K \). Determine if it is possible to construct a sequence \( a \) such that \( a_1 \times a_2 \times \ldots \times a_K = N \). If it is possible, construct one such sequence that is the lexicographically smallest among all possible sequences. Each element of the sequence must be a positive integer greater than or equal to 2.
Input Format
Two positive integers \( N \) and \( K \) are given in one line.
\( N \ K \)
Output Format
If no such sequence exists, output -1. Otherwise, output \( K \) integers.
Sample Input and Output
Sample Input #1
30 3
Sample Output #1
2 3 5
Sample Input #2
30 4
Sample Output #2
-1
Sample Input #3
123456 7
Sample Output #3
2 2 2 2 2 2 1929
Notes/Hints
Constraints
- \( 1 \leq N \leq 10^9 \)
- \( 1 \leq K \leq 10^9 \)
Sample Explanation 1
Since \( 2 \times 3 \times 5 = 30 \), this sequence satisfies the condition. Other sequences like 3 2 5 or 5 2 3 are also possible, but 2 3 5 is the lexicographically smallest.
Sample Explanation 2
It is impossible to construct any sequence under the given conditions.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分