#include<bits/stdc++.h>
#define MAXN 4000
using namespace std;
struct BIGNUM
{
int len,s[MAXN];
BIGNUM()
{
len=1;
memset(s,0,sizeof(s));
}
bool operator < (const BIGNUM &x) const
{
if(len!=x.len) return len<x.len;
for(int i=len-1;i>=0;i--)
if(s[i]!=x.s[i]) return s[i]<x.s[i];
return false;
}
bool operator > (const BIGNUM &x) const
{
return x<*this;
}
bool operator <= (const BIGNUM &x) const
{
return !(x<*this);
}
bool operator >= (const BIGNUM &x) const
{
return !(*this<x);
}
bool operator == (const BIGNUM &x) const
{
return !(x<*this||*this<x);
}
bool operator != (const BIGNUM &x) const
{
return x<*this||*this<x;
}
BIGNUM operator = (const char* num)
{
len=strlen(num);
for(int i=0;i<len;i++)
s[i]=num[len-i-1]-'0';
return *this;
}
BIGNUM operator = (const int num)
{
char a[MAXN];
sprintf(a,"%d",num);
*this=a;
return *this;
}
BIGNUM (int num)
{
*this=num;
}
BIGNUM (const char* num)
{
*this=num;
}
BIGNUM operator + (const BIGNUM &a)
{
BIGNUM c;
c.len=max(len,a.len)+1;
for(int i=0,x=0;i<c.len;i++)
{
c.s[i]=s[i]+a.s[i]+x;
x=c.s[i]/10;
c.s[i]=c.s[i]%10;
}
if(c.s[c.len-1]==0) c.len--;
return c;
}
BIGNUM operator += (const BIGNUM &a)
{
*this=*this+a;
return *this;
}
BIGNUM operator * (const BIGNUM &a)
{
BIGNUM c;
for(BIGNUM i=0;i<*this;i+=1)
c+=a;
return c;
}
BIGNUM operator *= (const BIGNUM &a)
{
*this=*this*a;
return *this;
}
BIGNUM operator - (const BIGNUM &a)
{
BIGNUM c;
c.len=max(len,a.len);
for(int i=0;i<c.len; i++)
{
if(s[i]<a.s[i])
{
s[i]+=10;
s[i+1]--;
}
c.s[i]=s[i]-a.s[i];
}
while(c.s[c.len-1]==0) c.len--;
return c;
}
BIGNUM operator -= (const BIGNUM &a)
{
*this=*this-a;
return *this;
}
BIGNUM operator / (const BIGNUM &a)
{
BIGNUM c;
c.len=max(len,a.len);
while(*this>=a)
{
c+=1;
*this-=a;
}
while(c.s[c.len-1]==0) c.len--;
return c;
}
BIGNUM operator /= (const BIGNUM &a)
{
*this=*this/a;
return *this;
}
BIGNUM operator % (const BIGNUM &a)
{
if(*this==a) return 0;
while(*this>a)
{
*this-=a;
if(*this==a) return 0;
}
while(s[len-1]==0) len--;
return *this;
}
};
ostream& operator << (ostream &out,const BIGNUM& x)
{
for(int i=x.len-1;i>=0;i--)
cout<<x.s[i];
return out;
}
istream& operator >> (istream &in,BIGNUM &x)
{
char num[MAXN];
in>>num;
x=num;
return in;
}
BIGNUM a;
void fj(BIGNUM x)
{
while(x>1)
{
for(BIGNUM i=2;i<=x;i+=1)
if(x%i==0)
{
x/=i;
cout<<i<<" ";
break;
}
}
}
int main()
{
cin>>a;
fj(a);
return 0;
}