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