<gh_stars>0
from typing import List

def factorize(number: int) -> List[int]:
    if number == 2:
        return [2]

    result = []

    i = 2
    while i * i <= number:
        if number % i == 0:
            result.append(i)
            number = number // i
            continue
        i += 1

    result.append(number)
    return result

result = factorize(int(input()))
print(" ".join(map(str, result)))

from typing import List

def factorize(number: int) -> List[int]:
    if number == 2:
        return [2]

    result = []

    i = 2
    while i * i <= number:
        if number % i == 0:
            result.append(i)
            number = number // i
            continue
        i += 1

    result.append(number)
    return result

result = factorize(int(input()))
print(" ".join(map(str, result)))