#include<iostream>
#define ll long long int
using namespace std;
void prime_factor(ll n)
{
while(n%2 == 0)
{
cout << 2 << " ";
n = n/2;
}
for(ll i=3; i*i<=n; i+=2)
{
while(n%i==0)
{
cout << i << " ";
n = n/i;
}
}
if(n > 2)
{
cout << n;
}
cout << endl;
}
int main()
{
ll a;
cin >> a;
cout << endl;
prime_factor(a);
return 0;
}
Comments
Post a Comment