#include #include #include #include using namespace std; //namaega184 int main(){ int n,k;scanf("%d%d",&n,&k); int isp[100001]={0,0,1}; for(int i=3;i<=n;i++)if(i&1)isp[i]=1;else isp[i]=0; for(int i=3;i*i<=n;i+=2){ if(isp[i]){ for(int j=i*i;j<=n;j+=i)isp[j]=0; } } if(n%2==0){ printf("%d\n",n/2); return 0; } else{ int cnt=0; for(int i=3;i*i<=n;i+=2){ if(!isp[i])continue; if(n%i==0){ cnt=0; int nn=n; while(n!=1){nn/=n;cnt++;} int ans=i; cnt/=2; for(int i=1;i