import Control.Applicative ((<$>))
import Control.Arrow ((&&&))
import Data.List (sortBy,group)
import Text.Printf (printf)


comb n r = iterate (scanl1 (+)) [1,1..] !! fromIntegral(n-r) !! fromIntegral r

average :: [(Integer,Integer)] -> Double
average s = fromIntegral(sum(map (uncurry(*)) s))/(fromIntegral.length) s

solve :: Integer -> Integer -> [(Integer,Integer)] -> [(Integer,Integer)] -> (Double,Integer)
solve a b (h@(e,l):svs) stack
  | ls == 0 && a <= l = (fromIntegral e,sum [comb l r|r<-[a..min l b]])
  | ls > 0 && a <= l  = (average ((e,a):stack),comb l a)
  | l < a = solve (a-l) (b-l) svs (h:stack)
  where ls = length stack

main = do
  [n,a,b] <- map read.words <$> getLine :: IO [Integer]
  vs <- map read.words <$> getLine :: IO [Integer]
  let svs = map (head&&&fromIntegral.length).group.sortBy (flip compare) $ vs :: [(Integer,Integer)]
      (avg,pat) = solve a b svs []
  printf "%.7f\n%d\n" avg pat
