import Data.List

main = do
	[n,k] <- (map (read :: String -> Int). words) <$> getLine
	lista <- (map read . words) <$> getLine
	putStrLn $ show (sort [(lista !! a) * (lista !! b)|a<-[0..(n-1)],b<-[(a+1)..(n-1)]] !! (k-1))