#C232. Prime Factorization
Prime Factorization
Prime Factorization
Given a positive integer \( n \), your task is to compute its prime factorization. In other words, you need to express \( n \) as a product of prime numbers. Formally, if
[ n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k} ]
where \( p_1, p_2, \dots, p_k \) are prime numbers and \( a_1, a_2, \dots, a_k \) are positive integers, then your program should output the sequence of prime factors in non-decreasing order. The factors must be printed separated by a single space.
Note: You need to read the input from stdin and output the result to stdout.
inputFormat
The input consists of a single integer ( n ) (with ( 2 \le n \le 10^9 )).
outputFormat
Output the prime factors of ( n ) in non-decreasing order separated by a single space.## sample
28
2 2 7