#include<bits/stdc++.h> using namespace std; int x,cnt; int p[10010],ci[10010];//p存因数,ci存每个因数出现的次数 void chai(int n){ for(int i=2;i*i<=n;i++){ if(n%i==0){ p[++cnt]=i; while(n%i==0){ n/=i; ci[cnt]++; } } } if(n>1){ p[++cnt]=n; ci[cnt]=1; } for(int i=1;i<=cnt;i++) cout<<p[i]<<" "<<ci[i]<<endl; } int main(){ cin>>x; chai(x); return 0; }