program N2;
var a,n: longint;
begin
writeln ('vvedit chislo');
readln (n);
a:=sqr(n);
while (n<>0) and (n mod 10 = a mod 10) do
begin
n:=n div 10;
a:=a div 10;
end;
if n=0 then
writeln ('chislo avtomorfne')
else
writeln ('chislo ne avtomorfne');
readln
end.