#include<stdio.h>
int main()
{
freopen("10392in.txt","r",stdin);
freopen("10392out.txt","w",stdout);
long long n,tag,i;
while(scanf("%lld",&n)!=EOF&&n!=-1)
{
i=2;tag=0;
while(n>1)
{
if(n%i==0)
{
printf(" %lld\n",i);
n=n/i;
}
else i++;
if(i*i>n)
{
printf(" %lld\n",n);
break;
}
}
printf("\n");
}
return 0;
}
SAMPLE INPUT
90
1234567891
18991325453139
12745267386521023
-1
SAMPLE OUTPUT
2
3
3
5
1234567891
3
3
13
179
271
1381
2423
30971
411522630413