GCD

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

문제

You are given an array of integers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n.

Find the maximum possible greatest common divisor of all numbers from the array if you can erase no more than kk elements (kn2k \le \frac{n}{2}) from this array.

입력

The first line contains two integers: nn, the number of elements in the array, and kk, the maximum number of elements you can erase (2n1052 \le n \le 10^5, 0kn20 \le k \le \frac{n}{2}).

The second line contains nn integers a_1,a_2,,a_na\_1, a\_2, \ldots, a\_n: the array aa (1a_i10181 \le a\_i \le 10^{18}).

출력

Print the maximum possible greatest common divisor of all elements of the array after erasing no more than kk elements.