program dem_nguyento;
uses crt;
var A:array[1..1000] of integer;
n,i,j,d,du:integer;
begin
clrscr;
write('Nhap so luong phan tu: '); readln(n);
d:=0;
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(A[i]);
if A[i]>=2 then
begin
du:=0;
for j:=1 to A[i] do
if A[i] mod j=0 then du:=du+1;
if du=2 then d:=d+1;
end;
write('Co ',d,' so nguyen to');
readln;
end.