public static void process ( ) throws IOException {
  long n = sc . nextLong ( ) , x = sc . nextLong ( ) , y = sc . nextLong ( ) ;
  long val = ( x + y ) - n ;
  long max = - 1 ;
  if ( val <= 0 ) max = 1 ;
  else max = min ( n , val + 1 ) ;
  long min = - 1 ;
  val = min ( n - x , y - 1 ) ;
  min = val ;
  min += x ;
  System . out . println ( max + " " + min ) ;
}

public static void process ( ) throws IOException { long n = sc . nextLong ( ) , x = sc . nextLong ( ) , y = sc . nextLong ( ) ; long val = ( x + y ) - n ; long max = - 1 ; if ( val <= 0 ) max = 1 ; else max = min ( n , val + 1 ) ; long min = - 1 ; val = min ( n - x , y - 1 ) ; min = val ; min += x ; System . out . println ( max + " ▁ " + min ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters) (throws (type_identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) alternative: (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (identifier) right: (decimal_integer_literal))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (unary_expression operand: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (identifier)) (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (string_literal)) right: (identifier)))))))