import io.StdIn.readLine

object Main extends App {
  val Array(_, a, b) = readLine.split(" ").map(_.toInt)
  val vs = readLine.split(" ").toSeq.map(_.toLong).sortBy(-_)

  case class Memo[A, B, C](f: (A, B) => C) extends ((A, B) => C) {
    private val cache = collection.mutable.Map.empty[(A, B), C]
    def apply(x: A, y: B) = cache getOrElseUpdate ((x, y), f(x, y))
  }

  val bc: Memo[Long, Long, Long] = Memo {
    case (_, 0) => 1
    case (n, k) if n == k => 1
    case (n, k) => bc(n - 1, k - 1) + bc(n - 1, k)
  }

  def solve(a: Int, b: Int, vs: Seq[Long]) = {
    val v0s = vs.takeWhile(_ == vs(0))
    val i = v0s.size

    if (vs.take(a).distinct.size > 1) {
      val i_first_ath = vs.indexOf(vs(a - 1))
      val nAth = vs.count(_ == vs(a - 1))
      bc(nAth, a - i_first_ath)
    }
    else {
      val ks = for (i <- a to b if vs.take(i).distinct.size == 1) yield i.toLong
      ks.map(k => bc(i.toLong, k)).sum
    }
  }

  def mean(xs: Seq[Long]) = 1.0 * xs.sum / xs.size

  println(if (vs.take(a).distinct.size == 1) vs(0) else mean(vs.take(a)))
  println(solve(a, b, vs))
}
