static int findSplit ( int [ ] arr , int n ) {
  int i ;
  int preSum = 0 ;
  int ind1 = - 1 , ind2 = - 1 ;
  int S ;
  S = arr [ 0 ] ;
  for ( i = 1 ;
  i < n ;
  i ++ ) S += arr [ i ] ;
  if ( S % 3 != 0 ) return 0 ;
  int S1 = S / 3 ;
  int S2 = 2 * S1 ;
  for ( i = 0 ;
  i < n ;
  i ++ ) {
    preSum += arr [ i ] ;
    if ( preSum % S1 == 0 && ind1 == - 1 ) ind1 = i ;
    else if ( preSum % S2 == 0 ) {
      ind2 = i ;
      break ;
    }
  }
  if ( ind1 != - 1 && ind2 != - 1 ) {
    System . out . print ( "(" + ind1 + ", " + ind2 + ")" ) ;
    return 1 ;
  }
  return 0 ;
}

static int findSplit ( int [ ] arr , int n ) { int i ; int preSum = 0 ; int ind1 = - 1 , ind2 = - 1 ; int S ; S = arr [ 0 ] ; for ( i = 1 ; i < n ; i ++ ) S += arr [ i ] ; if ( S % 3 != 0 ) return 0 ; int S1 = S / 3 ; int S2 = 2 * S1 ; for ( i = 0 ; i < n ; i ++ ) { preSum += arr [ i ] ; if ( preSum % S1 == 0 && ind1 == - 1 ) ind1 = i ; else if ( preSum % S2 == 0 ) { ind2 = i ; break ; } } if ( ind1 != - 1 && ind2 != - 1 ) { System . out . print ( " ( " + ind1 + " , ▁ " + ind2 + " ) " ) ; return 1 ; } return 0 ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (integral_type) dimensions: (dimensions)) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (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: (unary_expression operand: (decimal_integer_literal))) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (decimal_integer_literal)))) (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (expression_statement (assignment_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (decimal_integer_literal))) consequence: (return_statement (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (decimal_integer_literal) right: (identifier)))) (for_statement init: (assignment_expression left: (identifier) right: (decimal_integer_literal)) condition: (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)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (unary_expression operand: (decimal_integer_literal))))) consequence: (expression_statement (assignment_expression left: (identifier) right: (identifier))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (unary_expression operand: (decimal_integer_literal))) right: (binary_expression left: (identifier) right: (unary_expression operand: (decimal_integer_literal))))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (string_literal) right: (identifier)) right: (string_literal)) right: (identifier)) right: (string_literal))))) (return_statement (decimal_integer_literal)))) (return_statement (decimal_integer_literal))))