program stock;
var
s:array [1..1000] of double;
ans,min,max:double;
n,i,j:integer;
num,win,m:longint;
begin
assign (input,'stock.in');
reset (input);
readln (n);
for i:=1 to n do read (s[i]);
readln (m);
close (input);
min:=maxlongint;
for i:=1 to n do begin
max:=0;
if s[i]<min then min:=s[i];
for j:=i to n do if s[j]>max then max:=s[j];
num:=trunc(m/min);
if max*num-min*num>ans then ans:=num*max-min*num;
end;
assign (output,'stock.out');
rewrite (output);
writeln (ans:0:3);
win:=0;
for i:=1 to n-1 do for j:=i+1 to n do if (s[i]<s[j]) and (s[i]<m) then inc(win);
writeln (win/(n*(n-1)/2):0:3);
close (output);
end.