v=0 while v<2e3: n=v=v+1;exec's=0;exec"s+=(n%10)**2;n/=10;"*4;n=s;'*9 if n<2:print v