def test(a,d): b = [] c = [] i = 0 for i in range(2, int(a ** 0.5)+1): if a % i == 0: b.append(i) b.append(int(a/i)) c = b[0:2] if c != []: i = i + 1 d.append(c[0]) test(c[1],d) shuru = int(input()) d = [] e = 1 test(shuru,d) for i in d: print(i,end=' ') e = e * i print(int(shuru/e),end=' ')