main=mapM print[x|x<-[2..12^4],mod(2^x-2)x+x==(read.reverse.show)x]