uses crt;
var a:array[1..100]of integer;
i,n,dem,tb,dem1,kt,j:integer;
begin
clrscr;
write('Nhap n='); readln(n);
for i:=1 to n do
begin
write('A[',i,']='); readln(a[i]);
end;
for i:=1 to n do
write(a[i],',');
tb:=0;
dem:=0;
for i:=1 to n do
if i mod 2=0 then
begin
tb:=tb+a[i];
inc(dem);
end;
writeln('Trung binh cong cac phan tu o vi tri chan la: ',tb/dem:4:2);
dem1:=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 inc(dem1);
end;
writeln('So so nguyen to la: ',dem1);
readln;
end.