'use strict'

function Main(input) {
  input = input.trim().split('\n')
  const A = input[1].split(' ').map(s => parseInt(s))
  const res = input[0].split(' ').map(s => parseInt(s))
  const N = res[0]
  const K = res[1]

  let results = []
  for(let i = 0; i < N - 1; ++i) {
    const a = A[i]
    for (let j = i + 1; j < N; ++j) {
      const b = A[j]
      results.push(a * b)
    }
  }

  results = results.sort((a, b) => a - b)
  console.log(results[K - 1])
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));