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


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

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

solve :: Int -> Int -> [(Int,Int)] -> [(Int,Int)] -> (Float,Integer)
solve a b (h@(e,l):svs) stack
  | ls == 0 && a <= l = (fromIntegral e,sum [comb l r|r<-[a..max 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 [Int]
  vs <- map read.words <$> getLine :: IO [Int]
  let svs = map (head&&&length).group.sortBy (flip compare) $ vs :: [(Int,Int)]
      (avg,pat) = solve a b svs []
  putStr $ unlines [show avg, show pat]
