#include <iostream>
using namespace std;
int main(void)
{
int n;
cin >> n; //정수 n입력
//n이 1이하일 경우에만 정지
while (n > 1)
{
for (int i = 2; i <= n; i++) //2부터 n까지 반복
{
if (n % i == 0) //반복 도중 n에 나누어 떨어지는 경우
{
n /= i; //n을 i에 나눈 값을 저장
cout << i << endl; //소인수 분해 결과 = i 출력
break; //n의 크기 검사를 위해 반복 중지
}
}
}
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKHZvaWQpCnsKCWludCBuOwoJY2luID4+IG47CQkvL+ygleyImCBu7J6F66ClCgoJLy9u7J20IDHsnbTtlZjsnbwg6rK97Jqw7JeQ66eMIOygleyngAoJd2hpbGUgKG4gPiAxKQkKCXsKCQlmb3IgKGludCBpID0gMjsgaSA8PSBuOyBpKyspCS8vMuu2gO2EsCBu6rmM7KeAIOuwmOuztQoJCXsKCQkJaWYgKG4gJSBpID09IDApCQkJCS8v67CY67O1IOuPhOykkSBu7JeQIOuCmOuIhOyWtCDrlqjslrTsp4DripQg6rK97JqwCgkJCXsKCQkJCW4gLz0gaTsJCQkJCS8vbuydhCBp7JeQIOuCmOuIiCDqsJLsnYQg7KCA7J6lCgkJCQljb3V0IDw8IGkgPDwgZW5kbDsJCS8v7IaM7J247IiYIOu2hO2VtCDqsrDqs7wgPSBpIOy2nOugpQoJCQkJYnJlYWs7CQkJCQkvL27snZgg7YGs6riwIOqygOyCrOulvCDsnITtlbQg67CY67O1IOykkeyngAoJCQl9CgkJfQoJfQp9