from math import sqrt num = int(input()) factor = 2 for i in range(2, int(sqrt(num) + 1)): while num % i == 0: print(i, end=" ") num //= i if num > 2: print(num)