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

#SP0000019. Phân tích thành thừa số nguyên tố (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 thừa số nguyên tố (Factorization)

Factorization

Source: AtCoder

Version: Phuoc Hung OJ Extended

Problem Statement

Given an integer N≥2N\ge2, express it as a product of prime numbers. List all prime factors including repeated occurrences, in non-decreasing order. For example, 36=2⋅2⋅3⋅336=2\cdot2\cdot3\cdot3 has the list 2,2,3,32,2,3,3.

Input

One line contains integer NN.

Output

Print every prime factor of NN in non-decreasing order, separated by spaces.

Subtasks

  • Subtask 1 (20 points): 2≤N≤100002\le N\le 10000.
  • Subtask 2 (30 points): 2≤N≤1000000002\le N\le 100000000.
  • Subtask 3 (50 points): 2≤N≤10000000000002\le N\le 1000000000000.

Examples

Input

10

Output

2 5

Explanation

Since 10=2⋅510=2\cdot5 and both factors are prime, print 2 5.

Input

36

Output

2 2 3 3

Explanation

Factor 36=2⋅18=2⋅2⋅9=22⋅3236=2\cdot18=2\cdot2\cdot9=2^2\cdot3^2. Both primes appear twice, giving 2 2 3 3.