program ex;
type
ss=array[1..1000]of real;
var
f:ss;
n,m:longint;
i,j,t: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);
for i:=1 to n-1 do
for j:=i+1 to n do
begin
inc(t);
temp:=(f[j]-f[i])*m;
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.