import Control.Monad
import Data.List
import Text.Printf
c n r = product [n-r+1..n] `div` product [1..r]
main = do
  [n,a,b] <- map read . words <$> getLine
  vs <- map read . words <$> getLine
  let (xs,ys) = splitAt (fromInteger a) $ reverse $ sort vs
  let p = genericLength $ filter (== last xs) xs
  let q = genericLength $ filter (== last xs) ys
  printf "%f\n" (fromInteger (sum xs) / fromInteger a :: Double)
  print $ if p == a 
    then sum $ map ((p+q) `c`) [p..(p+q)`min`b]
    else (p+q) `c` p