public static void main ( String [ ] args ) {
  Scanner sc = new Scanner ( System . in ) ;
  int N = sc . nextInt ( ) ;
  int A = sc . nextInt ( ) ;
  int B = sc . nextInt ( ) ;
  long [ ] [ ] nCr = new long [ N + 1 ] [ N + 1 ] ;
  nCr [ 0 ] [ 0 ] = 0 ;
  for ( int row = 1 ;
  row <= N ;
  row ++ ) {
    nCr [ row ] [ 0 ] = 1 ;
    for ( int col = 1 ;
    col <= row - 1 ;
    col ++ ) {
      nCr [ row ] [ col ] = nCr [ row - 1 ] [ col - 1 ] + nCr [ row - 1 ] [ col ] ;
    }
    nCr [ row ] [ row ] = 1 ;
  }
  long [ ] v = new long [ N ] ;
  for ( int i = 0 ;
  i < N ;
  i ++ ) {
    v [ i ] = sc . nextLong ( ) ;
  }
  Arrays . sort ( v ) ;
  long sum1 = 0 ;
  for ( int i = N - 1 ;
  i >= N - A ;
  i -- ) {
    sum1 += v [ i ] ;
  }
  double ans1 = sum1 / ( ( double ) A ) ;
  int cnt1 = 0 ;
  int cnt2 = 0 ;
  for ( int i = N - 1 ;
  i >= 0 ;
  i -- ) {
    if ( v [ i ] > v [ N - A ] ) cnt1 ++ ;
    if ( v [ i ] == v [ N - A ] ) cnt2 ++ ;
  }
  long ans2 = 0 ;
  if ( v [ N - A ] < v [ N - 1 ] ) {
    ans2 = nCr [ cnt2 ] [ A - cnt1 ] ;
  }
  else {
    for ( int i = A ;
    i <= Math . min ( B , cnt2 ) ;
    i ++ ) {
      ans2 += nCr [ cnt2 ] [ i ] ;
    }
  }
  System . out . println ( ans1 ) ;
  System . out . println ( ans2 ) ;
}

public static void main ( String [ ] args ) { Scanner sc = new Scanner ( System . in ) ; int N = sc . nextInt ( ) ; int A = sc . nextInt ( ) ; int B = sc . nextInt ( ) ; long [ ] [ ] nCr = new long [ N + 1 ] [ N + 1 ] ; nCr [ 0 ] [ 0 ] = 0 ; for ( int row = 1 ; row <= N ; row ++ ) { nCr [ row ] [ 0 ] = 1 ; for ( int col = 1 ; col <= row - 1 ; col ++ ) { nCr [ row ] [ col ] = nCr [ row - 1 ] [ col - 1 ] + nCr [ row - 1 ] [ col ] ; } nCr [ row ] [ row ] = 1 ; } long [ ] v = new long [ N ] ; for ( int i = 0 ; i < N ; i ++ ) { v [ i ] = sc . nextLong ( ) ; } Arrays . sort ( v ) ; long sum1 = 0 ; for ( int i = N - 1 ; i >= N - A ; i -- ) { sum1 += v [ i ] ; } double ans1 = sum1 / ( ( double ) A ) ; int cnt1 = 0 ; int cnt2 = 0 ; for ( int i = N - 1 ; i >= 0 ; i -- ) { if ( v [ i ] > v [ N - A ] ) cnt1 ++ ; if ( v [ i ] == v [ N - A ] ) cnt2 ++ ; } long ans2 = 0 ; if ( v [ N - A ] < v [ N - 1 ] ) { ans2 = nCr [ cnt2 ] [ A - cnt1 ] ; } else { for ( int i = A ; i <= Math . min ( B , cnt2 ) ; i ++ ) { ans2 += nCr [ cnt2 ] [ i ] ; } } System . out . println ( ans1 ) ; System . out . println ( ans2 ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal))) dimensions: (dimensions_expr (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (decimal_integer_literal)) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (decimal_integer_literal)) right: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (binary_expression left: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (array_access array: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))) index: (identifier))))))) (expression_statement (assignment_expression left: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)) right: (decimal_integer_literal))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (parenthesized_expression (cast_expression type: (floating_point_type) value: (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) condition: (binary_expression left: (identifier) right: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))))) consequence: (expression_statement (update_expression (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))))) consequence: (expression_statement (update_expression (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (identifier))) right: (array_access array: (identifier) index: (binary_expression left: (identifier) right: (decimal_integer_literal))))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (binary_expression left: (identifier) right: (identifier)))))) alternative: (block (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (identifier)))) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (array_access array: (array_access array: (identifier) index: (identifier)) index: (identifier)))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))