s=t=1:2e4;for(i in t[-1])if(s[i]){s=s&t%%i;y=i%/%10^(0:log10(i))%%10;if(all(y==rev(y)))write(i,"")}