import java.io.{BufferedReader, InputStream, InputStreamReader}
import java.util.StringTokenizer

import scala.collection.mutable
import scala.util.Sorting
import math.{abs, max, min}
import scala.collection.mutable.{ArrayBuffer, ListBuffer}

object Main {
  val MOD = 1000000007
  def solve(): Unit = {
    val sc = new InputReader(System.in)
    val N, A, B = sc.nextInt()
    val V = Array.fill[Long](N)(sc.nextLong())

    val dp = Array.ofDim[Long](N + 1, N + 1)
    val cnt = Array.ofDim[Long](N + 1, N + 1)
    (0 until N) foreach (i => cnt(i)(0) = 1)

    for {
      j <- 1 to N
      i <- 1 to N
    } {
      val v = dp(i - 1)(j - 1) + V(i - 1)
      val v0 = dp(i - 1)(j)
      if (v > v0) {
        dp(i)(j) = v
        cnt(i)(j) = cnt(i - 1)(j - 1)
      } else if (v == v0) {
        dp(i)(j) = v0
        cnt(i)(j) = cnt(i - 1)(j) + cnt(i - 1)(j - 1)
      } else {
        dp(i)(j) = v0
        cnt(i)(j) = cnt(i - 1)(j)
      }
    }

    val averages = dp(N).zipWithIndex.slice(A, B + 1) map {
      case (v, j) => (v.toDouble / j, cnt(N)(j))
    }
    val (m, count) = averages.groupBy(_._1) mapValues (_.map(_._2).sum) maxBy (_._1)

    println(f"$m%.6f")
    println(count)
  }


  def main(args: Array[String]): Unit = {
    solve()
  }


  class InputReader(val stream: InputStream) {
    private val reader = new BufferedReader(new InputStreamReader(stream), 32768)
    private var tokenizer: StringTokenizer = null

    def next: String = {
      while (tokenizer == null || !tokenizer.hasMoreTokens)
        tokenizer = new StringTokenizer(reader.readLine)
      tokenizer.nextToken
    }

    def nextInt(): Int = next.toInt
    def nextLong(): Long = next.toLong
    def nextChar(): Char = next.charAt(0)
  }

}
