import Data.List
import Data.Array.IO
import Data.Ratio
import Data.Fixed
import Control.Monad
import Numeric

main = do
  (n:a:b:_) <- getLine >>= return . map read . words :: IO [Int]
  vs <- getLine >>= return . map read . words :: IO [Integer]

  dp <- newArray ((0,0),(n,n)) (0,1) :: IO (IOArray (Int,Int) (Ratio Integer, Integer))

  forM_ [1..n] $ \i -> do
    forM_ [1..n] $ \j -> do
      (a1,c1) <- readArray dp (i-1,j-1) >>= \(a,c) -> return ((a*(fromIntegral $ j-1)+(fromIntegral $ vs!!(i-1)))/(fromIntegral j), c)
      (a2,c2) <- readArray dp (i-1,j)

      if a1 == a2 then
        writeArray dp (i,j) (a1,c1+c2)
        else
        writeArray dp (i,j) (if a1>a2 then (a1,c1) else (a2,c2))
        
  result <- forM [a..b] $ \i -> readArray dp (n,i)

  let (mx,_) = maximumBy (\x y -> compare (fst x) (fst y)) result
  let count = sum . map snd $ filter ((==mx) . fst) result

  putStrLn $ showFFloat Nothing (fromRational mx) ""
  print $ count
