program bing;
var
f1,f2:text;
n,i,j:integer;
a:array[1..1000] of real;
m:longint;
t,max:real;
z,f:integer;
begin
assign(f1,'stock.in');reset(f1);
assign(f2,'stock.out');rewrite(f2);
readln(f1,n);
for i:=1 to n do read(f1,a[i]);
readln(f1);
read(f1,m);
max:=0;
for i:=1 to n-1 do
for j:=i+1 to n do
begin
t:=(a[j]-a[i])*m;
if t>max then max:=t;
if t>0 then inc(z) else inc(f);
end;
writeln(f2,max:0:3);
writeln(f2,z/(z+f):0:3);
close(f1);close(f2);
end.