uses crt;
var a,b:array[1..100]of integer;
i,n,kt,dem,j:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
dem:=0;
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
begin
inc(dem);
b[dem]:=a[i];
end;
end;
if dem=0 then writeln('Khong co so nguyen to trong day')
else begin
writeln('Cac so nguyen to trong day la: ');
for i:=1 to dem do
write(b[i]:4);
end;
readln;
end.