program ex;
type
ss=array[1..1000]of real;
var
f:ss;
n,m:longint;
i,j,t,k:longint;
ans1,ans2,temp:real;
begin
assign(input,'stock.in');
assign(output,'stock.out');
reset(input);
rewrite(output);
readln(n);
for i:=1 to n do read(f[i]);
readln;
readln(m);
close(input);
ans2:=0;
for i:=1 to n-1 do
for j:=i+1 to n do
begin
inc(t);
k:=1;
while k*f[i]<=m do inc(k);
temp:=(f[j]-f[i])*(k-1);
if temp>0 then ans2:=ans2+1;
if temp>ans1 then ans1:=temp;
end;
writeln(ans1:0:3);
writeln((ans2/t):0:3);
close(output);
end.