# Authored by : gusdn3477
# Co-authored by : -
# Link : http://boj.kr/ebf75b738a784d6dad28494e18113b31
import sys

def input():
    return sys.stdin.readline().rstrip()

N = int(input())
X = N
for i in range(2, N + 1):
    if X == 1:
        break
    while X % i == 0:
        X //= i
        print(i)

670f86bec449206dd9aa1ca65bda6231ae4ee473
<mask token>


def input():
    return sys.stdin.readline().rstrip()


<mask token>

<mask token>


def input():
    return sys.stdin.readline().rstrip()


<mask token>
for i in range(2, N + 1):
    if X == 1:
        break
    while X % i == 0:
        X //= i
        print(i)

<mask token>


def input():
    return sys.stdin.readline().rstrip()


N = int(input())
X = N
for i in range(2, N + 1):
    if X == 1:
        break
    while X % i == 0:
        X //= i
        print(i)

import sys


def input():
    return sys.stdin.readline().rstrip()


N = int(input())
X = N
for i in range(2, N + 1):
    if X == 1:
        break
    while X % i == 0:
        X //= i
        print(i)

# Authored by : gusdn3477
# Co-authored by : -
# Link : http://boj.kr/ebf75b738a784d6dad28494e18113b31
import sys

def input():
    return sys.stdin.readline().rstrip()

N = int(input())
X = N
for i in range(2, N + 1):
    if X == 1:
        break
    while X % i == 0:
        X //= i
        print(i)
