main=mapM print[p|p<-[2..12^4],p==read(reverse$show$gcd(2^p-2)p)]