#ABC155D. 数对乘积 / Pairs

数对乘积 / Pairs

Source: AtCoder ABC155 D - Pairs

Statement

Given N integers, consider all unordered pairs of different positions. Compute each pair product, sort all products increasingly, and output the K-th product.

Input

N K
A_1 A_2 ... A_N

Output

Print the K-th smallest pair product.

Constraints

  • 2 <= N <= 2 * 10^5
  • 1 <= K <= N(N-1)/2
  • -10^9 <= A_i <= 10^9
4 3
3 3 -4 -2
-6
10 40
5 4 3 2 -1 0 0 0 0 0
6