import Data.List
import Data.List.Split
import Text.Printf
import System.Environment (getArgs)

choose n 0 = 1
choose n k | n == k = 1
           | k == 0 = 1
           | otherwise = (((fromIntegral n) :: Integer) * (choose (n - 1) k)) `div` fromIntegral (n - k)

search minCount maxCount (x:xs) | minCount <= x = (x, minCount, min x maxCount)
                                | otherwise = f (minCount - x) xs
  where f _ [] = (0, 0, 0)
        f count (x:xs) | count <= x = (x, x - count, x - count)
                       | otherwise = f (count - x) xs

combo minCount maxCount ls = (average, sum $ map (\i -> choose width i) [minK..maxK])
  where average = (fromIntegral (sum $ take minCount $ sortedList)) / (fromIntegral minCount :: Double)
        (width, minK, maxK) = search minCount maxCount $ map length $ groupBy (==) $ sortedList
        sortedList = reverse $ sort ls

solve minCount maxCount ls = [printf "%.6f" average, show n]
  where (average, n) = combo minCount maxCount ls

main = do
  l1 <- getLine
  let (x:minCount:maxCount:xs) = map (read::String->Int) $ splitOn " " l1
  l2 <- getLine
  let ls = map (read::String->Integer) $ splitOn " " l2
  let answer = solve minCount maxCount ls
  putStrLn $ answer!!0
  putStrLn $ answer!!1
