import Data.List
import Data.Function (on)
import Control.Applicative

main = do
  [n, k] <- map read . words <$> getLine
  xs <- map read . words <$> getLine
  print $ (sort . solve $ xs)!!(k-1)
  where
    solve [x] = []
    solve (x:xs) = ([x * y | y <- xs]) ++ (solve xs)
