import Data.List

showp (x,y) = unlines [show x, show y]
allEq xs = and $ zipWith (==) xs (tail xs)
fact n = product [1 .. fromIntegral n]
comb n r = div (fact n) (fact r * fact (n-r)) 

main = do
 [n,a,b] <- map read . words <$> getLine
 vs <- map read . words <$> getLine :: IO [Integer]
 putStrLn $ showp (mas n a b vs)

mas n a b vs
 | allEq inita && allEq initb = (ave, sum (map (comb lmax) [a .. min b lmax]))
 | allEq inita = (ave, sum (map (comb lmax) [a .. a + lminInitb]))
 | otherwise = (ave, comb (length (filter (== last inita) svs)) lminInita)
 where
  svs@(maxv:_) = sortBy (flip compare) vs
  inita = take a svs
  lminInita = length $ filter (== last inita) inita
  initb = take b svs
  lminInitb = length $ takeWhile (== last inita) (drop a initb)
  lmax = length $ head $ group svs
  ave = fromIntegral (sum (take a svs)) / fromIntegral a