#K86122. Prime Factorization of an Integer

    ID: 36795 Type: Default 1000ms 256MiB

Prime Factorization of an Integer

Prime Factorization of an Integer

Given an integer \( n \), decompose it into its prime factors in ascending order. You need to print the prime factors separated by a single space. If \( n < 2 \) (i.e., \( n = 0, 1 \) or a negative number), print nothing.

For example:

  • If \( n = 60 \), the output should be: 2 2 3 5.
  • If \( n = 13 \), the output should be: 13.
  • If \( n = 1 \), the output should be an empty line.

The solution should correctly factorize the number.

inputFormat

The input consists of a single integer \( n \) provided via standard input (stdin).

outputFormat

Output the prime factors of \( n \) in ascending order separated by a single space to standard output (stdout). If \( n < 2 \), output nothing.

## sample
60
2 2 3 5