const fi='dl.pas'
fo='qk.pas'
var f1,f2:text;
i,n,dem,t,dem1,dem2,kt,j:integer;
a:array[1..100]of integer;
begin
assign(f1,fi); reset(f1);
assign(f2,fo); rewrite(f2);
readln(f1,n);
for i:=1 to n do
read(f1,a[i]);
dem:=0;
for i:=1 to n do
if (a[i] mod 2<>0) and (a[i] mod 7=0) then inc(dem);
t:=0;
for i:=1 to n do
if (10<=a[i]) and (a[i]<=30) then t:=t+a[i];
dem1:=0;
for i:=1 to n do
if (a[i]<0) and (a[i] mod 2<>0) then inc(dem1);
dem2:=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(dem2);
end;
writeln(f2,'So phan tu le chia het cho 7 la: ',dem);
writeln(f2,'Tong cac phan tu thuoc [10,30] la: ',t);
writeln(f2,'So cac phan tu am le la: ',dem1);
writeln(f2,'So phan tu la so nguyen to la: ',dem2);
close(f1);
close(f2);
end.