PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000213. Phân tích thành đúng k thừa số (k-Factorization)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Phân tích thành đúng k thừa số (k-Factorization)

Phân tích thành đúng k thừa số (k-Factorization)

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

Given positive integers n,kn,k, find exactly kk integers b1,…,bkb_1,\ldots,b_k, each strictly greater than 11, such that their product equals nn. The factors need not be distinct. Print -1 if impossible; otherwise print any valid factorization.

Input

One line contains nn and kk.

Output

Print -1 if impossible; otherwise print kk space-separated integers.

Subtasks

  • Subtask 1 (20 points): 2≤n≤1002\le n\le 100; 1≤k≤51\le k\le 5.

  • Subtask 2 (30 points): 2≤n≤100002\le n\le 10000; 1≤k≤121\le k\le 12.

  • Subtask 3 (50 points): 2≤n≤1000002\le n\le 100000; 1≤k≤201\le k\le 20.

Examples

Example 1

Input

100000 2

Output

2 50000

Explanation

2 and 50000 are greater than one and their product is 100000.

Example 2

Input

100000 20

Output

-1

Explanation

The prime-factor multiplicity of 100000 is only 10, so 20 factors are impossible.

Example 3

Input

1024 5

Output

2 2 2 2 64

Explanation

There are five factors 2,2,2,2,64; their product is 1024.