program chinh_phuong;
uses crt;
var A:array[1..10000] of integer;
n,i:integer;
begin
clrscr;
write('Nhap so luong phan tu: '); readln(n);
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(A[i]);
end;
for i:=1 to n do
if A[i]=sqr(trunc(sqrt(A[i]))) then write(A[i],' ');
readln;
end.