uses crt;
var n,kt,s,i,j,k:integer;
{--------------------------------chuong-trinh-con----------------------------------------}
function ktngto(var x:integer):boolean;
var a:integer;
begin
ktngto:=true;
a:=round(sqrt(x));
if n mod a<>0 then ktngto:=false
else ktngto:=true;
end;
{-------------------------------chuong-trinh-chinh------------------------------------}
begin
clrscr;
write('n='); readln(n);
if n>1 then
begin
if ktngto(n)=false then writeln(n,' la so nguyen to')
else writeln(n,' la hop so');
end
else writeln(n,' khong la so nguyen to cung khong la hop so');
if n>=0 then
begin
if n=0 then writeln(0)
else
begin
s:=-1;
while s<=n do
begin
inc(s);
if trunc(sqrt(s))=sqrt(s) then write(s:4);
end;
end;
end;
writeln;
j:=2;
while j<=n do
begin
j:=j+1;
if ktngto(j)=false then write(j:4);
end;
readln;
end.