static void countCoprimePairs ( int n ) {
  int count = 0 ;
  System . out . println ( "The co- prime pairs are: " ) ;
  for ( int i = 2 ;
  i <= Math . sqrt ( n ) ;
  i ++ ) {
    if ( n % i == 0 ) {
      if ( __gcd ( i , ( n / i ) ) == 1 ) {
        System . out . print ( "(" + i + ", " + ( n / i ) + ")\n" ) ;
        count ++ ;
      }
    }
  }
  System . out . println ( "\nNumber of coprime pairs : " + count ) ;
}

static void countCoprimePairs ( int n ) { int count = 0 ; System . out . println ( " The ▁ co - ▁ prime ▁ pairs ▁ are : ▁ " ) ; for ( int i = 2 ; i <= Math . sqrt ( n ) ; i ++ ) { if ( n % i == 0 ) { if ( __gcd ( i , ( n / i ) ) == 1 ) { System . out . print ( " ( " + i + " , ▁ " + ( n / i ) + " ) \n " ) ; count ++ ; } } } System . out . println ( " \n Number ▁ of ▁ coprime ▁ pairs ▁ : ▁ " + count ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier) (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))) right: (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: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (string_literal))))) (expression_statement (update_expression (identifier))))))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (string_literal) right: (identifier)))))))