object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val n, a, b = sc.nextInt()
  val v = Array.fill(n)(sc.nextLong()).sorted
  val max = v.takeRight(a).sum.toDouble / a
  val x = v(n-a)
  val m = v.count(_ == x)
  val k = v.takeRight(a).count(_ == x)

  def initCombTable(n: Int): Array[Array[Long]] = {
    val comb = Array.tabulate(n+1)(i => Array.fill(i+1)(1L))
    for {
      i <- 1 to n
      j <- 1 until i
    } {
      comb(i)(j) = comb(i-1)(j-1) + comb(i-1)(j)
    }
    comb
  }

  val comb = initCombTable(m)

  val ans = if (v.takeRight(a).distinct.length == 1) {
    (k to k + (b - a).min(m - k)).map(comb(m)(_)).sum
  } else {
    comb(m)(k)
  }

  println(f"$max%f")
  println(ans)
}
