Statistics

아직 제출이 없습니다시간 제한1.5초메모리 제한256 MB

문제

It is time to select courses for your last semester of university. There are NN courses available, numbered from 11 through NN. Course ii is worth v_iv\_i units, and you need at least VV units to graduate. Because you want more time to train for ACM ICPC, you want to choose a subset of courses that gives exactly VV units. Also, you want to choose the least number of courses possible to minimize the amount of time spent walking around campus. You call such a subset a good schedule.

You are having trouble choosing among all possible good schedules, so you turn to statistics for help. For each good schedule, viewing it as a list of the units of its courses, you calculate:

  • aa, the average value.
  • bb, the median value. (In case the list's length is even, use the smaller of the two middle values.)
  • cc, the maximum number of times a single value appears.
  • dd, the difference between the maximum value and the minimum value.

For each of aa, bb, cc, and dd, find its minimum over all good schedules.

입력

The first line contains two integers, NN and VV: the number of courses and the number of units you need to graduate (1N,V50001 \leq N, V \leq 5000).

The next line contains NN integers v_1,v_2,,v_Nv\_1, v\_2, \ldots, v\_N, the number of units in each of the available courses (1v_iV1 \leq v\_i \leq V).

출력

Print out four space-separated real numbers: the minimum aa, bb, cc, and dd over all good schedules, in that order. If there are no good schedules, print a single integer 1-1 instead. Your answer must have an absolute or relative error less than 10610^{-6}.