public static String solve ( String s ) {
  if ( s . length ( ) < 3 ) return ( unbalanced ( s ) ? "1 2" : "-1 -1" ) ;
  for ( int i = 0 ;
  i < s . length ( ) - 2 ;
  i ++ ) {
    if ( unbalanced ( s . substring ( i , i + 3 ) ) ) return ( ( i + 1 ) + " " + ( i + 3 ) ) ;
  }
  return "-1 -1" ;
}

public static String solve ( String s ) { if ( s . length ( ) < 3 ) return ( unbalanced ( s ) ? "1 ▁ 2" : " - 1 ▁ - 1" ) ; for ( int i = 0 ; i < s . length ( ) - 2 ; i ++ ) { if ( unbalanced ( s . substring ( i , i + 3 ) ) ) return ( ( i + 1 ) + " ▁ " + ( i + 3 ) ) ; } return " - 1 ▁ - 1" ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal))) consequence: (return_statement (parenthesized_expression (ternary_expression condition: (method_invocation name: (identifier) arguments: (argument_list (identifier))) consequence: (string_literal) alternative: (string_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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (method_invocation name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))))) consequence: (return_statement (parenthesized_expression (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (string_literal)) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))))))))) (return_statement (string_literal))))