program stock;
var
n,i,j,m:longint;
data:array[1..1000]of real;
max:real;
procedure init;
begin
assign(input,'stock.in');
reset(input);
assign(output,'stock.out');
rewrite(output);
readln(n);
for i:=1 to n do read(data[i]);
readln;
readln(m);
end;
procedure closef;
begin
close(input);
close(output);
end;
procedure main;
var
p,pp:longint;
num:real;
begin
max:=-1;
for i:=1 to n-1 do
for j:=i+1 to n do
if data[j]-data[i]>max then
begin
pp:=i;
p:=j;
max:=data[j]-data[i];
end;
num:=trunc(m/data[pp])*max;
writeln(num:0:3);
p:=0;
pp:=0;
for i:=1 to n-1 do
for j:=i+1 to n do
begin
inc(p);
if data[j]-data[i]>0 then
inc(pp);
end;
writeln(pp/p:0:3);
end;
begin
init;
main;
closef;
end.