import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
class PrimeFactorisation {
/**
* Code obtained from studyalgorithms.com
*/
public static void main
(String[] args
) {
Scanner scanner
= new Scanner
(System.
in); long N = scanner.nextLong();
Set<Long> primeFactors = new HashSet<>();
while (N % 2 == 0) {
N /= 2;
primeFactors.add(2L);
}
for (long j
= 3; j
<= Math.
sqrt(N
); j
+= 2) { while (N % j == 0) {
N /= j;
primeFactors.add(j);
}
}
if (N > 2)
primeFactors.add(N);
for (Long primeFactor
: primeFactors
) { System.
out.
print(primeFactor
+ " "); }
}
}
aW1wb3J0IGphdmEudXRpbC5IYXNoU2V0OwppbXBvcnQgamF2YS51dGlsLlNjYW5uZXI7CmltcG9ydCBqYXZhLnV0aWwuU2V0OwoKY2xhc3MgUHJpbWVGYWN0b3Jpc2F0aW9uIHsKCiAgLyoqCiAgICogQ29kZSBvYnRhaW5lZCBmcm9tIHN0dWR5YWxnb3JpdGhtcy5jb20KICAgKi8KCiAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewoKICAgIFNjYW5uZXIgc2Nhbm5lciA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CiAgICBsb25nIE4gPSBzY2FubmVyLm5leHRMb25nKCk7CiAgICBTZXQ8TG9uZz4gcHJpbWVGYWN0b3JzID0gbmV3IEhhc2hTZXQ8PigpOwoKICAgIHdoaWxlIChOICUgMiA9PSAwKSB7CiAgICAgIE4gLz0gMjsKICAgICAgcHJpbWVGYWN0b3JzLmFkZCgyTCk7CiAgICB9CgogICAgZm9yIChsb25nIGogPSAzOyBqIDw9IE1hdGguc3FydChOKTsgaiArPSAyKSB7CiAgICAgIHdoaWxlIChOICUgaiA9PSAwKSB7CiAgICAgICAgTiAvPSBqOwogICAgICAgIHByaW1lRmFjdG9ycy5hZGQoaik7CiAgICAgIH0KICAgIH0KCiAgICBpZiAoTiA+IDIpCiAgICAgIHByaW1lRmFjdG9ycy5hZGQoTik7CgogICAgZm9yIChMb25nIHByaW1lRmFjdG9yIDogcHJpbWVGYWN0b3JzKSB7CiAgICAgIFN5c3RlbS5vdXQucHJpbnQocHJpbWVGYWN0b3IgKyAiICIpOwogICAgfQoKICB9Cn0K