#include <iostream> using namespace std; int main() { unsigned n,f=2,p; cin>>n; while(n!=1) { p=0; while(n%f==0) { n/=f; ++p; } if(p>0)cout<<f<<" "<<p<<endl; ++f; } return 0; }
#include <iostream> using namespace std; int main() { unsigned n,f=2,p; cin>>n; while(n!=1) { p=0; while(n%f==0) { n/=f; ++p; } if(p>0)cout<<f<<" "<<p<<endl; ++f; } return 0; }