#C12096. Prime Factorization
Prime Factorization
Prime Factorization
Given an integer \( n \), determine its prime factors. The factors should be listed in non-decreasing order. Note that when \( n = 1 \), there are no prime factors, and the output should be empty.
For example, if \( n = 28 \), the prime factors are 2 2 7
and if \( n = 45 \), the prime factors are 3 3 5
.
inputFormat
A single integer ( n ) provided via standard input. ( n ) is a positive integer (e.g., 1 ( \le n \le 10^9 )).
outputFormat
Print the prime factors of ( n ) separated by a single space on one line via standard output. If ( n = 1 ), print nothing.## sample
28
2 2 7