include
include
include
using namespace std;
typedef long long ll;
void get_prime(int x)
{
while(x>1)
{
for(int i=2;i<=x;i++)
{
if(x%i==0)
{
x=x/i;
cout<<i<<" ";
break;
}
}
}
cout<<endl;
}
int main()
{
int n;
while(cin>>n)
{
get_prime(n);
}
}