public static void process ( ) throws IOException {
  int n = ni ( ) ;
  String s1 = nln ( ) ;
  String s2 = nln ( ) ;
  int s [ ] = new int [ n ] ;
  int m [ ] = new int [ n ] ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    s [ i ] = Integer . parseInt ( String . valueOf ( s1 . charAt ( i ) ) ) ;
    m [ i ] = Integer . parseInt ( String . valueOf ( s2 . charAt ( i ) ) ) ;
  }
  Arrays . sort ( s ) ;
  Arrays . sort ( m ) ;
  int min = 0 , max = n ;
  int i = 0 ;
  int j = 0 ;
  while ( i < n && j < n ) {
    if ( s [ i ] <= m [ j ] ) {
      i ++ ;
    }
    j ++ ;
  }
  if ( i < n ) {
    min = ( n - i ) ;
  }
  i = 0 ;
  j = 0 ;
  while ( i < n && j < n ) {
    if ( s [ i ] < m [ j ] ) {
      i ++ ;
    }
    j ++ ;
  }
  if ( i < n ) {
    max = i ;
  }
  pn ( min ) ;
  pn ( max ) ;
}

public static void process ( ) throws IOException { int n = ni ( ) ; String s1 = nln ( ) ; String s2 = nln ( ) ; int s [ ] = new int [ n ] ; int m [ ] = new int [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { s [ i ] = Integer . parseInt ( String . valueOf ( s1 . charAt ( i ) ) ) ; m [ i ] = Integer . parseInt ( String . valueOf ( s2 . charAt ( i ) ) ) ; } Arrays . sort ( s ) ; Arrays . sort ( m ) ; int min = 0 , max = n ; int i = 0 ; int j = 0 ; while ( i < n && j < n ) { if ( s [ i ] <= m [ j ] ) { i ++ ; } j ++ ; } if ( i < n ) { min = ( n - i ) ; } i = 0 ; j = 0 ; while ( i < n && j < n ) { if ( s [ i ] < m [ j ] ) { i ++ ; } j ++ ; } if ( i < n ) { max = i ; } pn ( min ) ; pn ( max ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) dimensions: (dimensions) 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 (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (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)) declarator: (variable_declarator name: (identifier) 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))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) consequence: (block (expression_statement (update_expression (identifier))))) (expression_statement (update_expression (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier)))) consequence: (block (expression_statement (update_expression (identifier))))) (expression_statement (update_expression (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier))))))