var a:array[1..100] of integer;
n,i,p:byte;
s,x,k,l:integer;
begin
read(n);
writeln;
for i:=1 to n do begin
read(a[i]);
if (a[i] mod 2 = 1) and (a[i]<1000000) then begin
s+=a[i];
inc(k);
end;
l:=0;
for x:=1 to a[i] do if a[i] mod x = 0 then inc(l);
if l=2 then inc(p);
end;
writeln;
write('Media: ',s/k,' Prime: ',p);
end.