public static void main ( String [ ] args ) {
  Scanner in = new Scanner ( System . in ) ;
  long h = in . nextLong ( ) , w = in . nextLong ( ) ;
  int n = in . nextInt ( ) ;
  Map < Long , Integer > map = new HashMap < > ( ) ;
  int [ ] dx = {
    0 , 0 , 1 , 1 , 1 , 0 , - 1 , - 1 , - 1 };
    int [ ] dy = {
      0 , - 1 , - 1 , 0 , 1 , 1 , 1 , 0 , - 1 };
      for ( int i = 0 ;
      i < n ;
      i ++ ) {
        int a = in . nextInt ( ) - 1 , b = in . nextInt ( ) - 1 ;
        for ( int k = 0 ;
        k < 9 ;
        k ++ ) {
          int y = a + dy [ k ] , x = b + dx [ k ] ;
          if ( x < 1 || w - 1 <= x || y < 1 || h - 1 <= y ) {
            continue ;
          }
          long key = ( long ) y << 32 | x ;
          Integer val = map . get ( key ) ;
          map . put ( key , val == null ? 1 : val + 1 ) ;
        }
      }
      System . out . println ( ( h - 2 ) * ( w - 2 ) - map . size ( ) ) ;
      long [ ] cnt = new long [ 10 ] ;
      for ( long key : map . keySet ( ) ) {
        cnt [ map . get ( key ) ] ++ ;
      }
      for ( int i = 1 ;
      i < 10 ;
      i ++ ) {
        System . out . println ( cnt [ i ] ) ;
      }
    }
    
public static void main ( String [ ] args ) { Scanner in = new Scanner ( System . in ) ; long h = in . nextLong ( ) , w = in . nextLong ( ) ; int n = in . nextInt ( ) ; Map < Long , Integer > map = new HashMap < > ( ) ; int [ ] dx = { 0 , 0 , 1 , 1 , 1 , 0 , - 1 , - 1 , - 1 } ; int [ ] dy = { 0 , - 1 , - 1 , 0 , 1 , 1 , 1 , 0 , - 1 } ; for ( int i = 0 ; i < n ; i ++ ) { int a = in . nextInt ( ) - 1 , b = in . nextInt ( ) - 1 ; for ( int k = 0 ; k < 9 ; k ++ ) { int y = a + dy [ k ] , x = b + dx [ k ] ; if ( x < 1 || w - 1 <= x || y < 1 || h - 1 <= y ) { continue ; } long key = ( long ) y << 32 | x ; Integer val = map . get ( key ) ; map . put ( key , val == null ? 1 : val + 1 ) ; } } System . out . println ( ( h - 2 ) * ( w - 2 ) - map . size ( ) ) ; long [ ] cnt = new long [ 10 ] ; for ( long key : map . keySet ( ) ) { cnt [ map . get ( key ) ] ++ ; } for ( int i = 1 ; i < 10 ; i ++ ) { System . out . println ( cnt [ i ] ) ; } }
(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))) 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: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (generic_type (type_identifier) (type_arguments (type_identifier) (type_identifier))) declarator: (variable_declarator name: (identifier) value: (object_creation_expression type: (generic_type (type_identifier) (type_arguments)) arguments: (argument_list)))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_initializer (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (unary_expression operand: (decimal_integer_literal)) (unary_expression operand: (decimal_integer_literal)) (unary_expression operand: (decimal_integer_literal))))) (local_variable_declaration type: (array_type element: (integral_type) dimensions: (dimensions)) declarator: (variable_declarator name: (identifier) value: (array_initializer (decimal_integer_literal) (unary_expression operand: (decimal_integer_literal)) (unary_expression operand: (decimal_integer_literal)) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (decimal_integer_literal) (unary_expression operand: (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 (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (decimal_integer_literal))) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) right: (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier)))) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (identifier) right: (array_access array: (identifier) index: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier))) right: (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (identifier)))) consequence: (block (continue_statement))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (binary_expression left: (cast_expression type: (integral_type) value: (identifier)) right: (decimal_integer_literal)) right: (identifier)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) (expression_statement (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier) (ternary_expression condition: (binary_expression left: (identifier) right: (null_literal)) consequence: (decimal_integer_literal) alternative: (binary_expression left: (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: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal)))) right: (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 (decimal_integer_literal))))) (enhanced_for_statement type: (integral_type) name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list)) body: (block (expression_statement (update_expression (array_access array: (identifier) index: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (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: (decimal_integer_literal)) update: (update_expression (identifier)) body: (block (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (array_access array: (identifier) index: (identifier)))))))))