public static void main ( String [ ] args ) throws Exception {
  Scanner in = new Scanner ( new File ( "C-large.in" ) ) ;
  PrintWriter out = new PrintWriter ( new FileWriter ( new File ( "C-large.out" ) ) ) ;
  int t = in . nextInt ( ) ;
  for ( int x = 0 ;
  x < t ;
  x ++ ) {
    int n = in . nextInt ( ) ;
    int [ ] xs = new int [ n ] ;
    int [ ] ys = new int [ n ] ;
    for ( int y = 0 ;
    y < n ;
    y ++ ) {
      xs [ y ] = in . nextInt ( ) ;
      ys [ y ] = in . nextInt ( ) ;
    }
    out . println ( "Case #" + ( x + 1 ) + ":" ) ;
    for ( int z = 0 ;
    z < xs . length ;
    z ++ ) {
      ArrayList < Double > angles = new ArrayList < Double > ( ) ;
      for ( int a = 0 ;
      a < xs . length ;
      a ++ ) {
        if ( a != z ) {
          double current = Math . atan2 ( ys [ a ] - ys [ z ] , xs [ a ] - xs [ z ] ) ;
          angles . add ( current ) ;
          angles . add ( current + 2.0 * Math . PI ) ;
        }
      }
      Collections . sort ( angles ) ;
      int index = 0 ;
      int result = n ;
      for ( int b = 0 ;
      b < n ;
      b ++ ) {
        while ( index < angles . size ( ) && angles . get ( index ) < angles . get ( b ) + Math . PI + 1E-12 ) {
          index ++ ;
        }
        result = Math . min ( result , n - ( index - b ) - 1 ) ;
      }
      if ( n == 1 ) {
        out . println ( 0 ) ;
      }
      else {
        out . println ( result ) ;
      }
    }
  }
  out . close ( ) ;
}

public static void main ( String [ ] args ) throws Exception { Scanner in = new Scanner ( new File ( " C - large . in " ) ) ; PrintWriter out = new PrintWriter ( new FileWriter ( new File ( " C - large . out " ) ) ) ; int t = in . nextInt ( ) ; for ( int x = 0 ; x < t ; x ++ ) { int n = in . nextInt ( ) ; int [ ] xs = new int [ n ] ; int [ ] ys = new int [ n ] ; for ( int y = 0 ; y < n ; y ++ ) { xs [ y ] = in . nextInt ( ) ; ys [ y ] = in . nextInt ( ) ; } out . println ( " Case ▁ # " + ( x + 1 ) + " : " ) ; for ( int z = 0 ; z < xs . length ; z ++ ) { ArrayList < Double > angles = new ArrayList < Double > ( ) ; for ( int a = 0 ; a < xs . length ; a ++ ) { if ( a != z ) { double current = Math . atan2 ( ys [ a ] - ys [ z ] , xs [ a ] - xs [ z ] ) ; angles . add ( current ) ; angles . add ( current + 2.0 * Math . PI ) ; } } Collections . sort ( angles ) ; int index = 0 ; int result = n ; for ( int b = 0 ; b < n ; b ++ ) { while ( index < angles . size ( ) && angles . get ( index ) < angles . get ( b ) + Math . PI + 1E-12 ) { index ++ ; } result = Math . min ( result , n - ( index - b ) - 1 ) ; } if ( n == 1 ) { out . println ( 0 ) ; } else { out . println ( result ) ; } } } out . close ( ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) (throws (type_identifier)) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal))))))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_creation_expression type: (integral_type) dimensions: (dimensions_expr (identifier))))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (array_access array: (identifier) index: (identifier)) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (string_literal) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (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: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (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)))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))) (binary_expression left: (array_access array: (identifier) index: (identifier)) right: (array_access array: (identifier) index: (identifier))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (binary_expression left: (decimal_floating_point_literal) right: (field_access object: (identifier) field: (identifier))))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (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: (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list))) right: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (binary_expression left: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))) right: (field_access object: (identifier) field: (identifier))) right: (decimal_floating_point_literal))))) body: (block (expression_statement (update_expression (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (binary_expression left: (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) right: (decimal_integer_literal)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) alternative: (block (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))))))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))