public static void factorsListFunc ( int first , int each_prod , int n , List < List < Integer >> result_list , List < Integer > single_result_list ) {
  if ( first > n || each_prod > n ) return ;
  if ( each_prod == n ) {
    ArrayList < Integer > t = new ArrayList < Integer > ( single_result_list ) ;
    result_list . add ( t ) ;
    return ;
  }
  for ( int i = first ;
  i < n ;
  i ++ ) {
    if ( i * each_prod > n ) break ;
    if ( n % i == 0 ) {
      single_result_list . add ( i ) ;
      factorsListFunc ( i , i * each_prod , n , result_list , single_result_list ) ;
      single_result_list . remove ( single_result_list . size ( ) - 1 ) ;
    }
  }
}

public static void factorsListFunc ( int first , int each_prod , int n , List < List < Integer > > result_list , List < Integer > single_result_list ) { if ( first > n || each_prod > n ) return ; if ( each_prod == n ) { ArrayList < Integer > t = new ArrayList < Integer > ( single_result_list ) ; result_list . add ( t ) ; return ; } for ( int i = first ; i < n ; i ++ ) { if ( i * each_prod > n ) break ; if ( n % i == 0 ) { single_result_list . add ( i ) ; factorsListFunc ( i , i * each_prod , n , result_list , single_result_list ) ; single_result_list . remove ( single_result_list . size ( ) - 1 ) ; } } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (generic_type (type_identifier) (type_arguments (generic_type (type_identifier) (type_arguments (type_identifier))))) name: (identifier)) (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier))) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (return_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments (type_identifier))) arguments: (argument_list (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (return_statement))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (identifier))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (break_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (identifier)) (identifier) (identifier) (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal)))))))))))