public static void solve ( int n ) {
  long u = n , v = n + 1 ;
  while ( ! BigInteger . valueOf ( u ) . isProbablePrime ( 10 ) ) u -- ;
  while ( ! BigInteger . valueOf ( v ) . isProbablePrime ( 10 ) ) v ++ ;
  long a = v * ( u - 2 ) + 2 * ( n - u + 1 ) , b = 2 * u * v ;
  long g = gcd ( a , b ) ;
  pw . write ( a / g + "/" + b / g + "\n" ) ;
}

public static void solve ( int n ) { long u = n , v = n + 1 ; while ( ! BigInteger . valueOf ( u ) . isProbablePrime ( 10 ) ) u -- ; while ( ! BigInteger . valueOf ( v ) . isProbablePrime ( 10 ) ) v ++ ; long a = v * ( u - 2 ) + 2 * ( n - u + 1 ) , b = 2 * u * v ; long g = gcd ( a , b ) ; pw . write ( a / g + " / " + b / g + " \n " ) ; }
(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: (identifier)) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (while_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) body: (expression_statement (update_expression (identifier)))) (while_statement condition: (parenthesized_expression (unary_expression operand: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) body: (expression_statement (update_expression (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (binary_expression left: (decimal_integer_literal) right: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))))) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (string_literal)) right: (binary_expression left: (identifier) right: (identifier))) right: (string_literal)))))))