uses crt;
var a:array[1..100]of integer;
i,n:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
writeln('Cac so chinh phuong la: ');
for i:=1 to n do
if sqrt(a[i])=trunc(sqrt(a[i])) then write(a[i]:4);
writeln;
writeln('Cac so chinh phuong chan la: ');
for i:=1 to n do
if ((sqrt(a[i])=trunc(sqrt(a[i]))) and (a[i] mod 2=0) then write(a[i]:4);
readln;
end.
for i:=1 to n do
if sqr(a[i])=sqr(trunc(sqrt(a[i]))) then
begin
write(a[i],' ');
if a[i] mod 2 =0 then write(a[i]);
writeln;
end;