public static void main ( String [ ] argv ) {
  Scanner sc = new Scanner ( System . in ) ;
  int tests = sc . nextInt ( ) ;
  for ( int t = 1 ;
  t <= tests ;
  t ++ ) {
    int n = sc . nextInt ( ) ;
    double x = 0. , y = 0 , z = 0 , dx = 0 , dy = 0 , dz = 0 ;
    for ( int i = 0 ;
    i < n ;
    i ++ ) {
      x += sc . nextDouble ( ) ;
      y += sc . nextDouble ( ) ;
      z += sc . nextDouble ( ) ;
      dx += sc . nextDouble ( ) ;
      dy += sc . nextDouble ( ) ;
      dz += sc . nextDouble ( ) ;
    }
    x /= n ;
    y /= n ;
    z /= n ;
    dx /= n ;
    dy /= n ;
    dz /= n ;
    double a = dx * dx + dy * dy + dz * dz ;
    double b = 2 * ( dx * x + dy * y + dz * z ) ;
    double c = x * x + y * y + z * z ;
    double s ;
    if ( a == 0 && b == 0 ) {
      s = 0 ;
    }
    else if ( a == 0 && b / c > 0 ) {
      s = 0 ;
    }
    else if ( a == 0 ) {
      s = - c / b ;
    }
    else if ( b / a > 0 ) {
      s = 0 ;
    }
    else {
      s = - b / a / 2 ;
    }
    double v = a * s * s + b * s + c ;
    if ( v < 0 ) {
      v = 0 ;
    }
    v = Math . sqrt ( v ) ;
    System . err . println ( t ) ;
    System . out . printf ( "Case #%d: %.08f %.08f\n" , t , v , s ) ;
  }
}

public static void main ( String [ ] argv ) { Scanner sc = new Scanner ( System . in ) ; int tests = sc . nextInt ( ) ; for ( int t = 1 ; t <= tests ; t ++ ) { int n = sc . nextInt ( ) ; double x = 0. , y = 0 , z = 0 , dx = 0 , dy = 0 , dz = 0 ; for ( int i = 0 ; i < n ; i ++ ) { x += sc . nextDouble ( ) ; y += sc . nextDouble ( ) ; z += sc . nextDouble ( ) ; dx += sc . nextDouble ( ) ; dy += sc . nextDouble ( ) ; dz += sc . nextDouble ( ) ; } x /= n ; y /= n ; z /= n ; dx /= n ; dy /= n ; dz /= n ; double a = dx * dx + dy * dy + dz * dz ; double b = 2 * ( dx * x + dy * y + dz * z ) ; double c = x * x + y * y + z * z ; double s ; if ( a == 0 && b == 0 ) { s = 0 ; } else if ( a == 0 && b / c > 0 ) { s = 0 ; } else if ( a == 0 ) { s = - c / b ; } else if ( b / a > 0 ) { s = 0 ; } else { s = - b / a / 2 ; } double v = a * s * s + b * s + c ; if ( v < 0 ) { v = 0 ; } v = Math . sqrt ( v ) ; System . err . println ( t ) ; System . out . printf ( " Case ▁ # % d : ▁ % .08f ▁ % .08f \n " , t , v , s ) ; } }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (type_identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))))) (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: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_floating_point_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_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: (identifier)) update: (update_expression (identifier)) body: (block (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (decimal_integer_literal) right: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) right: (binary_expression left: (identifier) right: (identifier))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (unary_expression operand: (identifier)) right: (identifier))))) alternative: (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal)))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (unary_expression operand: (identifier)) right: (identifier)) right: (decimal_integer_literal))))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))))) (expression_statement (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (string_literal) (identifier) (identifier) (identifier))))))))