In Berland a money reform is being prepared. New coins are being introduced. After long economic calculations was decided that the most expensive coin should possess the denomination of exactly *n* Berland dollars. Also the following restriction has been introduced for comfort: the denomination of each coin should be divisible by the denomination of any cheaper coin. It is known that among all the possible variants the variant with the largest number of new coins will be chosen. Find this variant. Print in the order of decreasing of the coins' denominations.
The first and only line contains an integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">6</sup>) which represents the denomination of the most expensive coin.

from collections import Counter
from math import *
from sys import *
from time import *
import re

def iii():
    return [int(iii) for iii in input().split()]
def fff():
    return [float(fff) for fff in input.split()]

def ii():
    return int(input())
def ff():
    return int(input())

def count(l):
    return dict(Counter(l))


def S1(n):
    return n*(n+1)//2


def S3(n):
    return pow(S1(n), 2)

def factors(n, noself = False):
    f = []
    sq = int(sqrt(n))
    for i in range(1, sq+1):
        if n%i == 0:
            f1 = i
            f2 = n//i
            f.append(f1)
            if f2 != f1:
                if noself and f2 == n:
                    continue
                else:
                    f.append(f2)
    return sorted(f)


def isprime(n):
    if n < 2:
        return False
    sq = int(sqrt(n))
    for i in range(1, sq+1):
        if n % i == 0:
            return False

    return True

n = int(input())
r = []
while n != 1:
    f = factors(n, noself=True)
    r.append(n)
    n = f[-1]

r.append(1)
print(" ".join([str(x) for x in r]))
