import Text.Printf
import Data.Char
import Data.List
import qualified Data.ByteString.Char8 as B
import qualified Data.Vector as V
main=putStr.solve.unfoldr(B.readInt.B.dropWhile isSpace)=<<B.getContents
solve(n:a:b:vs)=unlines[printf"%.6f"ra,show rc]where
  ws=(V.dropWhile=<<((>).(V.!(n-a)))).V.fromList.sort$vs
  k=V.length ws
  m=if k==a then 0 else V.length$(V.takeWhile=<<((==).V.head))ws
  c=V.generate(m+1)$ \i->if i==0 then 1 else c V.!(i-1)*(m-i+1)`div`i
  ra=x/y::Double where[x,y]=map fromIntegral[V.sum$V.slice(k-a)a ws,a]
  rc=sum$map(c V.!)$if k/=m then[a+m-k]else[a..min b m]