static void Calculate ( Vector < Integer > v [ ] ) {
  int [ ] vis = new int [ n + 1 ] ;
  Arrays . fill ( vis , 0 ) ;
  c = 0 ;
  dfs ( a , b , v , vis ) ;
  int ans1 = n - c - 1 ;
  Arrays . fill ( vis , 0 ) ;
  c = 0 ;
  dfs ( b , a , v , vis ) ;
  int ans2 = n - c - 1 ;
  System . out . print ( ans1 * ans2 + "\n" ) ;
}

static void Calculate ( Vector < Integer > v [ ] ) { int [ ] vis = new int [ n + 1 ] ; Arrays . fill ( vis , 0 ) ; c = 0 ; dfs ( a , b , v , vis ) ; int ans1 = n - c - 1 ; Arrays . fill ( vis , 0 ) ; c = 0 ; dfs ( b , a , v , vis ) ; int ans2 = n - c - 1 ; System . out . print ( ans1 * ans2 + " \n " ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (generic_type (type_identifier) (type_arguments (type_identifier))) name: (identifier) dimensions: (dimensions))) body: (block (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 (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (decimal_integer_literal))) (expression_statement (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal)))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (string_literal)))))))