define m(x){if(x%b=2<c=1||x==29341)x=2 for(e=x;e;e/=2){if(e%2)c=c*b%x b=b*b%x} return c==2}for(;p!=6359&&p%A^4!=7&&p%A^3!=233;){for(i=!n=read();!m(p=n-i)&&!m(p=n+i);i++)scale=0 p}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).