import Control.Monad
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,bs) = splitAt a $ sortBy (flip compare) vs
  v = last as
  x = length $ filter (==v) as
  y = length $ filter (==v) vs
  cnt = if x==length as then 2^y-1 else binom y x
  ave = (fromIntegral $ sum as)/fromIntegral a

binom = loop 1 1
  where
  loop fn fk _ 0 = fn `div` fk
  loop _  _  0 _ = 0
  loop fn fk n k = loop (fn*n) (fk*k) (n-1) (k-1)
