{int n,s=0;
n=m;
while(m!= 0){
s = s*10+m%10;
m/=10;
}
return s;
}
int prime(int m)
{ int k,n;
if(m == 1) return 0;
n = (int)sqrt(m);
for(k = 2; k <= n; k++) if(m%k == 0) return 0; return 1;} void main() {
int n,m,i,k=1;
for(i=100;i<=1000;i++) if(prime(i)&&prime(rev(i)))
if(k<=10){printf("%6d",i);k++;} else {k=1;printf("\n");}
}__