#include <stdio.h>
#include <stdlib.h>
#define N 46340
char table[N]={0};
int main(int argc, char *argv[])
{
int i,j;
for(i=2;i<N;i++){
if(table[i]==1)continue;
for(j=i+i;j<N;j+=i){
table[j]=1;
}
}
int x;
while(scanf("%d",&x
)==1){ if(x<N){
if(table[x]){
}else{
}
continue;
}
for(i=2;;i++){
if(i*i>x){
break;
}
if(table[i]==0&&x%i==0){
break;
}
}
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2RlZmluZSBOIDQ2MzQwCmNoYXIgdGFibGVbTl09ezB9OwppbnQgbWFpbihpbnQgYXJnYywgY2hhciAqYXJndltdKQp7CiAgaW50IGksajsKICBmb3IoaT0yO2k8TjtpKyspewogICAgICBpZih0YWJsZVtpXT09MSljb250aW51ZTsKICAgICAgZm9yKGo9aStpO2o8TjtqKz1pKXsKICAgICAgICAgIHRhYmxlW2pdPTE7ICAgICAgICAgICAgICAgICAgICAKICAgICAgfSAgICAgICAgICAgICAgICAgCiAgfQogIGludCB4OwogIHdoaWxlKHNjYW5mKCIlZCIsJngpPT0xKXsKICAgICAgaWYoeDxOKXsKICAgICAgICAgIGlmKHRhYmxlW3hdKXsKICAgICAgICAgICAgICBwcmludGYoIumdnuizquaVuFxuIik7ICAgICAgICAgICAgIAogICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgcHJpbnRmKCLos6rmlbhcbiIpOyAgICAgIAogICAgICAgICAgfQogICAgICAgICAgY29udGludWU7ICAgICAgICAKICAgICAgfQogICAgICBmb3IoaT0yOztpKyspewogICAgICAgICAgaWYoaSppPngpewogICAgICAgICAgICAgIHByaW50Zigi6LOq5pW4XG4iKTsKICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgCiAgICAgICAgICB9CiAgICAgICAgICBpZih0YWJsZVtpXT09MCYmeCVpPT0wKXsKICAgICAgICAgICAgICBwcmludGYoIumdnuizquaVuFxuIik7CiAgICAgICAgICAgICAgYnJlYWs7ICAKICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgIH0gICAgICAgICAgICAgICAgIAogIH0gIAogIHJldHVybiAwOwp9Cg==