A fiber shop has n spools with whole-number lengths. An order needs at least k patch cords, and every patch cord must be cut to the exact same whole-number length L. From a spool of length a[i] you can cut floor(a[i] / L) cords of length L, discarding any remainder; cords may not be spliced across spools.
Find the largest length L (at least 1) for which the total number of cords across all spools is at least k. The order is guaranteed to be fillable at L = 1.
Input format
Line 1: two integers n and k.
Line 2: n space-separated integers, the spool lengths.
Output format
A single integer: the largest cord length that yields at least k cords.
Constraints
- 1 <= n <= 40
- 1 <= each spool length <= 100000
- 1 <= k <= (sum of all spool lengths)