uses crt;
var i,n,max,j,b,d,d1,d2:longint;
a:array[1..100000] of integer;
begin
clrscr;
write('Nhap n: '); readln(n);
if n>1 then
for i:=1 to n do begin
write('a[',i,'] = '); readln(a[i]); end;
writeln('B.');
write('- Cac so chinh phuong la: ');
for i:=1 to n do begin
if a[i]>0 then begin
b:=trunc(sqrt(a[i]));
if sqr(b)=a[i] then write(a[i],' '); end; end; writeln;
write('- Cac so chan la: ');
for i:=1 to n do
if (a[i] mod 2=0) and (a[i]<>0) then write(a[i],' '); writeln;
write('- Cac so le la: ');
for i:=1 to n do
if (a[i] mod 2<>0) and (a[i]<>0) then write(a[i],' '); writeln;
write('- Cac so nguyen duong la: ');
for i:=1 to n do begin
if a[i]>0 then begin d:=d+1; write(a[i],' '); end;
if a[i]<0 then d1:=d1+1;
if a[i]=0 then d2:=d2+1; end; writeln;
write('- Cac so nguyen am la: ');
for i:=1 to n do
if a[i]<0 then write(a[i],' '); writeln;
writeln('- Co ',d,' so nguyen duong');
writeln('- Co ',d1,' so nguyen am');
write('- Co ',d2,' so 0');
readln
end.