import sys import math input_date = sys.stdin.read().strip() number = int(input_date) num = [] def A(N): for i in range(2,int(math.sqrt(N))+1): while N % i == 0: num.append(i) N = N / i if N > 1: num.append(int(N)) return num num = A(number) print(" ".join(map(str,num)))