Const n = 10;
var
a :array [1..n] of integer;
i, j, k, kol, p :integer;
begin
randomize;
for i:= 1 to n do
a[i]:= random(100);
for i:= 1 to n-1 do
for j:= 1 to n-i do
if a[j] > a[j+1] then
begin
k:= a[j];
a[j]:= a[j+1];
a[j+1]:= k;
end;
kol:= 0; p:= 1;
for i:= 1 to n do
if (a[i] > 20) and (a[i] < 50) then
begin
inc(kol);
p:= p * a[i];
end;
writeln(kol,' ',p);
end.