Schedule
Medium
Execution time limit is 0.3 seconds
Runtime memory usage limit is 64 megabytes
Petya has a collection of cards, each displaying a natural number: 1, 2, 3, and so on. Each card features exactly one number. Petya's goal is to select some of these cards so that the product of their numbers equals a specific natural number N. Your task is to assist him in achieving this.
Input
The input consists of a single line containing two natural numbers N and p, both of which are no greater than 10^9.
Output
Output p distinct natural numbers in a single line such that their product equals N. If multiple solutions exist, any valid set of numbers can be provided. If it is impossible to express N in this manner, output the single number 0.
Examples
Input #1
Answer #1
Submissions 196
Acceptance rate 4%