import Data.List

main = do
  n: k: _ <- map read . words <$> getLine :: IO [Int]
  as <- map read . words <$> getLine :: IO [Integer]
  putStrLn $ show $ head $ drop (k-1) $ sort $ pairs as

pairs :: [Integer] -> [Integer]
pairs as = concat $ unfoldr gen as
    where gen [] = Nothing
          gen (x: as) = Just ([ x * a | a <- as ], as)
