#include <cstdio>
using namespace std;
int main(void)
{
freopen("stock.in","r",stdin);
freopen("stock.out","w",stdout);
int i,j,n,total=0,beni=0;
double money,maxbeni=0,temp,val[1000];
scanf("%d",&n);
for (i=0;i<n;i++)
scanf("%lf",&val[i]);
scanf("%lf",&money);
for (i=0;i<n-1;i++)
for (j=i+1;j<n;j++)
{
total++;
temp=double(int(money/val[i]))*(val[j]-val[i]);
if (temp>0)
beni++;
if (temp>maxbeni)
maxbeni=temp;
}
printf("%.3lf\n%.3lf\n",maxbeni,double(beni)/double(total));
fclose(stdin);
fclose(stdout);
return(0);
}