#K72682. Prime Factorization
Prime Factorization
Prime Factorization
Given a positive integer \( n \) (with \( n \ge 2 \)), output its prime factors in ascending order. In other words, if\( n= p_1^{e_1} p_2^{e_2}\cdots p_k^{e_k} \) where each \( p_i \) is a prime factor, then output each prime factor repeated according to its exponent. The solution should be optimized to handle large values of \( n \).
Example:
- Input: 4 → Output: 2 2
- Input: 101 → Output: 101
inputFormat
The input consists of a single positive integer \( n \) (\( n \ge 2 \)), provided via standard input.
outputFormat
Output the prime factors of \( n \) in ascending order separated by a single space via standard output.
## sample2
2