uses crt;
var a:array[1..100]of integer;
n,i,j,kt: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 nguyen am la: ');
for i:=1 to n do
if a[i]<0 then write(a[i]:4);
writeln;
writeln('Cac so nguyen to la: ');
for i:=1 to n do
if a[i]>1 then
begin
kt:=0;
for j:=2 to a[i]-1 do
if a[i] mod j=0 then kt:=1;
if kt=0 then write(a[i]:4);
end;
readln;
end.