import Data.List

get_all_info::[Integer]->Int->Int->(Double,Integer)
get_all_info xs a b = let srtd = reverse (sort xs)in
                      let first_a = head srtd in
                      let last_a = srtd!!(a-1) in
                      if first_a /= last_a then let able = length (filter (\x-> x==last_a) (srtd)) in
                                                let takes= length (filter (\x-> x==last_a) (take a srtd)) in
                                                (average (take a srtd),comb (fromIntegral able) (fromIntegral takes))
                                           else let able = length (filter (\x-> x==first_a) (srtd)) in
                                                (fromIntegral first_a,sum [comb (fromIntegral able) (fromIntegral t)|t<-[a..(min b able)]])
fact::Integer -> Integer
fact 0=1
fact n = n*(fact (n-1))

comb::Integer->Integer->Integer
comb n k = fromIntegral (div (div (fact n) (fact k)) (fact (n-k)))

average::[Integer]->Double
average xs = (fromIntegral (sum xs))/(fromIntegral (length xs))

main::IO()
main=do
  nab<-getLine
  let n:a:b:[]= map read (words nab)
  dat<-getLine
  let xs = map read (words dat)
  let (av,pat)=(get_all_info xs a b)
  print av
  print pat