#C6255. Prime Factors Finder
Prime Factors Finder
Prime Factors Finder
Given a positive integer \(n\), compute its distinct prime factors in ascending order.
If \(n\) is equal to 1, then it is considered to have no prime factors and you should output -1
.
Note: The output should be printed as a series of numbers separated by a single space.
inputFormat
The input consists of a single positive integer \(n\) given via standard input.
For example:
28
outputFormat
If \(n \gt 1\), output the distinct prime factors of \(n\) in ascending order. Otherwise, output -1
. The output should be printed to standard output.
For example:
2 7## sample
28
2 7