program main
  implicit none
  integer(16)::N,A,B
  integer(16),allocatable,dimension(:,:)::C
  integer(16),allocatable,dimension(:)::v
  integer(16)::i
  integer(16),parameter::mo=10**9+7_16
  real(16)::ANS1
  integer(16)::ANS2
  integer(16)::cnt
  read*,N,A,B
  allocate(v(N))
  read*,v
  call heapsort(N,v)
  ANS1=0
  do i=N,N-A+1,-1
   ANS1=ANS1+v(i)
  end do
  ANS1=ANS1/real(A)
  print"(f0.20)",ANS1
  call comb_table(N)

  if(v(N)/=v(N-A+1))then
   cnt=1
   do i=N-A,1,-1
      if(v(i)/=v(N-A+1))exit
      cnt=cnt+1
   end do
   ANS2=cnt
  else
   cnt=A
   do i=N-A,1,-1
      if(v(i)/=v(N))exit
      cnt=cnt+1
   end do
   ANS2=0
   do i=A,B
      ANS2=ANS2+C(cnt,i)
   end do
  endif
  print"(i0)",ANS2
contains
subroutine heapsort(n,array)
  implicit none
!ここの入力は状況に応じて変更すること
  integer(16),intent(in) :: n
  integer(16),intent(inout) :: array(1:n)
  integer(16)::i,k,j,l
  integer(16):: t

  l=n/2+1
  k=n
  do while(k /= 1)
     if(l > 1)then
        l=l-1
        t=array(L)
     else
        t=array(k)
        array(k)=array(1)
        k=k-1
        if(k == 1) then
           array(1)=t
           exit
        endif
     endif
     i=l
     j=l+l
     do while(j<=k)
        if(j < k)then
           if(array(j) < array(j+1))j=j+1
        endif
        if (t < array(j))then
           array(i)=array(j)
           i=j
           j=j+j
        else
           j=k+1
        endif
     enddo
     array(i)=t
  enddo
  return
end subroutine heapsort
subroutine comb_table(N)
   integer(16)::N
   integer(16)::i,j
   allocate(C(0:N,0:N))
   C=0
   do i=0,N
      do j=0,i
         if(j==0 .or. j==i)then
            C(i,j)=1
         else
            C(i,j)=C(i-1,j-1)+C(i-1,j)
         endif
      end do
   end do
end subroutine
end program main