main=mapM print$filter h[1..2000] h n=n<2||n>4&&h(sum[read[x]^2|x<-show n])