#include<bits/stdc++.h>
using namespace std;
long long q,a[1000005];
long long fun(long long x){
int cnt=0;
for(int i=2;i*i<=x;i++){
while(x%i==0){
a[++cnt]=i;
x/=i;
}
}
if(x>1){
a[++cnt]=x;
}
return cnt;
}
int main(){
cin>>q;
if(fun(q)>=3){
cout<<"1"<<endl<<a[1]*a[2];
}
else{
cout<<"2";
}
return 0;
}