k-Factorization

题意翻译

## 题目描述 给一个正整数$n$ ,找到$k$ 个整数(不必不同),这些整数都严格大于$1$ ,并且它们的乘积等于$n$ 。 ### 输入格式: 第一行包含两个整数$n$ 和$k$ ($2\leq n\leq 100000,1\leq k\leq 20$ ) ### 输出格式: 如果不可能将$n$ 表示为$k$ 个数的乘积,输出-1。 否则,按任意顺序输出这$k$ 个整数。它们的乘积必须等于$n$ 。如果有多种解,任意输出一种。 感谢@Khassar 提供的翻译

题目描述

Given a positive integer $ n $ , find $ k $ integers (not necessary distinct) such that all these integers are strictly greater than $ 1 $ , and their product is equal to $ n $ .

输入输出格式

输入格式


The first line contains two integers $ n $ and $ k $ ( $ 2<=n<=100000 $ , $ 1<=k<=20 $ ).

输出格式


If it's impossible to find the representation of $ n $ as a product of $ k $ numbers, print -1. Otherwise, print $ k $ integers in any order. Their product must be equal to $ n $ . If there are multiple answers, print any of them.

输入输出样例

输入样例 #1

100000 2

输出样例 #1

2 50000 

输入样例 #2

100000 20

输出样例 #2

-1

输入样例 #3

1024 5

输出样例 #3

2 64 2 2 2