program so_nguyen_to;
uses crt;
var A:array[1..100] of integer;
n,i,d:byte;
function ktnt(k:integer):boolean;
var l:integer;
begin
ktnt:=false;
if k<2 then exit;
for l:=2 to trunc(sqrt(k)) do
if k mod l=0 then exit;
ktnt:=true;
end;
BEGIN
clrscr;
write('Nhap n: '); readln(n);
d:=0;
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(A[i]);
if ktnt(A[i]) then d:=d+1;
end;
if d=0 then write('Khong co so nguyen to nao')
else
begin
write('Co ',d,' so nguyen to do la: ');
for i:=1 to n do
if ktnt(A[i]) then write(A[i],' ');
end;
readln;
end.