Program stock;
Type
sc=array [1..1000] of real;
Var
s:sc;
i,j,n:longint;
m:longint;
max:real;
v:real;
z,b:longint;
Begin
assign(input,'stock.in');
assign(output,'stock.out');
reset(input);
rewrite(output);
readln(n);
v:=0;
for i:=1 to n do read(s[i]);
readln;
readln(m);
max:=0;
for i:=1 to (n-1) do
for j:=i+1 to n do
if (s[j]>s[i])and(s[i]<=m) then
if trunc(m/s[i])*(s[j]-s[i])>max then
max:=trunc(m/s[i])*(s[j]-s[i]);
z:=0;
b:=0;
for i:=1 to (n-1) do begin
for j:=i+1 to n do begin
if trunc(m/s[i])*(s[j]-s[i])>0 then z:=z+1
else b:=b+1;
end;
end;
if (z+b)<>0 then v:=z/(z+b);
writeln(max:0:3);
writeln(v:0:3);
close(input);
close(output);
End.