'use strict'

const compare = (a, b) => {
  return a - b
}

const Main = (input) => {
  const tmp = input.split('\n')
  const N = parseInt(tmp[0].split(' ')[0])
  const K = parseInt(tmp[0].split(' ')[1])
  const A = tmp[1].split(' ')
  let values = new Array(N * (N - 1) / 2)
  let count = 0
  for (let i = 0; i < N - 1; i++) {
    for (let j = i + 1; j < N; j++) {
      values[count] = parseInt(A[i]) * parseInt(A[j])
      count++
    }
  }
  values = values.sort(compare)
  console.log(values[K - 1])
}

Main(require('fs').readFileSync('/dev/stdin', 'utf8'))
