import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T
import Data.List (sort, tails)

main :: IO ()
main = do
  (n : k : _) <- map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  as <- sort . map unsafeTextToInt . T.words <$> T.getLine :: IO [Int]
  let
    ps = mergeAll $ zipWith f as (tail . tails $ as)
  print $ ps !! pred k

merge :: [Int] -> [Int] -> [Int]
merge xs [] = xs
merge [] ys = ys
merge xs@(x : xs') ys@(y : ys') | y < x     = y : merge xs ys'
                                | otherwise = x : merge xs' ys

merges :: [[Int]] -> [[Int]]
merges (xs : xs' : xss) = merge xs xs' : merges xss
merges xss = xss

mergeAll :: [[Int]] -> [Int]
mergeAll [] = []
mergeAll (xs : []) = xs
mergeAll xss = mergeAll . merges $ xss

f :: Int -> [Int] -> [Int]
f a as | a < 0     = map (a *) . reverse $ as
       | otherwise = map (a *) as

{-
f :: [Int] -> Int
f = f' (- 10 ^ 18 - 1) (10 ^ 18 + 1)
  where
    f' x y | succ x == y = y
           | p m         = f' x m
           | otherwise   = f' m y
      where
        m = (x + y) `div` 2
    p = (k <=) . g
    
-}

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
