import math n = int(input()) i = 2 while i <= int(math.sqrt(n)): while n % i == 0: print(i, end = ' ') n = n // i i += 1 if n > 1: print(n, end = ' ')