private static Consumer < List < String >> solve ( ) {
  return args -> {
    final List < Long > numList = Arrays . stream ( args . get ( 0 ) . split ( " " ) ) . map ( Long :: valueOf ) . collect ( toList ( ) ) ;
    final Long x = numList . get ( 0 ) ;
    final Long y = numList . get ( 1 ) ;
    if ( x == 1 ) {
      if ( y == 1 ) {
        System . out . println ( 1 ) ;
      }
      else {
        System . out . println ( y - 2 ) ;
      }
    }
    else if ( y == 1 ) {
      System . out . println ( x - 2 ) ;
    }
    else {
      System . out . println ( ( x - 2 ) * ( y - 2 ) ) ;
    }
  };
}

private static Consumer < List < String > > solve ( ) { return args -> { final List < Long > numList = Arrays . stream ( args . get ( 0 ) . split ( " ▁ " ) ) . map ( Long :: valueOf ) . collect ( toList ( ) ) ; final Long x = numList . get ( 0 ) ; final Long y = numList . get ( 1 ) ; if ( x == 1 ) { if ( y == 1 ) { System . out . println ( 1 ) ; } else { System . out . println ( y - 2 ) ; } } else if ( y == 1 ) { System . out . println ( x - 2 ) ; } else { System . out . println ( ( x - 2 ) * ( y - 2 ) ) ; } } ; }
(method_declaration (modifiers) type: (generic_type (type_identifier) (type_arguments (generic_type (type_identifier) (type_arguments (type_identifier))))) name: (identifier) parameters: (formal_parameters) body: (block (return_statement (lambda_expression parameters: (identifier) body: (block (local_variable_declaration (modifiers) type: (generic_type (type_identifier) (type_arguments (type_identifier))) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))) name: (identifier) arguments: (argument_list (string_literal))))) name: (identifier) arguments: (argument_list (method_reference (identifier) (identifier)))) name: (identifier) arguments: (argument_list (method_invocation name: (identifier) arguments: (argument_list)))))) (local_variable_declaration (modifiers) type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (local_variable_declaration (modifiers) type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_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 (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (decimal_integer_literal)))))) alternative: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))))))))))))))