#t544. 木材加工

木材加工

Wood Processing

Problem Description

To protect the environment, the lumber yard has nn logs and now wants to cut these logs into kk pieces of length ll each; there may be leftover material after cutting.

We want the resulting pieces to be as long as possible; find the maximum value of ll.

Lengths are measured in cm\text{cm}; the logs have positive-integer lengths, and we require the cut pieces to have positive-integer lengths as well.

For example, given two logs of lengths 1111 and 2121, to be cut into 66 equal pieces, the longest possible piece length is clearly 55.

Input Format

The first line contains two positive integers n,kn,k: the number of logs and the number of pieces needed.

The next nn lines each contain a positive integer LiL_i: the length of one log.

Output Format

One line: the maximum value of ll.

If even a 1 cm1\text{ cm}-long piece cannot be cut, output 00.

Sample Input

3 7
232
124
456

Sample Output

114

Sample Explanation

For the first sample, the three logs have lengths 232232, 124124, 456456 and we need to cut out 77 equal pieces. When the piece length is 114114, the first log yields 22 pieces, the second yields 11 piece, and the third yields 44 pieces, for a total of 2+1+4=72+1+4=7 pieces, which exactly meets the requirement. If the length increases to 115115, at most 2+1+3=62+1+3=6 pieces can be cut, which is fewer than 77, so the maximum length is 114114.

Constraints

For 100%100\% of the data, 1≤n≤1051 \le n \le 10^5, 1≤k≤1081 \le k \le 10^8, 1≤Li≤1081 \le L_i \le 10^8, where i∈[1,n]i \in [1,n].