import qualified Data.ByteString.Char8 as C
import Data.List
import Data.Ord

main = C.interact $ put . sol . get

get = fmap (unfoldr (C.readInt . C.dropWhile (==' '))) . C.lines

put = C.pack . unlines

sol [[n,a,b],vs] = [show ave,show cnt]
  where
  as = take a $ sortBy (flip compare) vs
  v = last as
  x = length $ filter (==v) as
  y = length $ filter (==v) vs
  ave = fromIntegral (sum as)/fromIntegral a
  cnt = if x==a
    then sum $ binom y <$> [x..min y b]
    else binom y x

binom n k = foldl' (\a i->div (a*(n-i+1)) i) 1 [1..k]