//iejr Header files
#include <stdio.h>
#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <stdlib.h>
#include <string>
#include <cstring>
#include <sstream>
#include <bitset>
#include <cmath>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <limits.h>
#include <ctime>
#include <cctype>
#include <functional>
#include <utility>
#include <numeric>

using namespace std;

//iejr: Type defination
typedef unsigned long long int             ULLN;
typedef long long int                      LLN;
typedef vector<int>                        VI;
typedef vector<vector<int> >               VVI;
typedef vector<string>                     VS;
typedef vector<vector<string> >            VVS;


//iejr: Compile Options
#define C11_Standard
//
#ifdef C11_Standard
    #include <unordered_set>
    #include <unordered_map>

    #define HASHSET                  unordered_set
    #define HASHMAP                  unordered_map
#endif // C11_Standard


//iejr: Local Debug
//#define INPUT_REDIRECTION
//#define OUTPUT_REDIRECTION

const int NMAX = 100000 + 3;

LLN H, W;
int N;

struct point{
    int y, x;
    point( int _y = 0, int _x = 0 ) : y( _y ), x(_x ){};
};

point record[NMAX];

void init(){
    memset( record, 0, sizeof( record[0] ) );
}

LLN getHash( int y, int x ){
    LLN hashTemp = y;
    hashTemp <<= 32;
    hashTemp |= (LLN)x;

    return hashTemp;
}

//iejr: Main Function
int main()
{

#ifdef INPUT_REDIRECTION
    freopen( "in.txt", "r", stdin );
#endif // INPUT_REDIRECTION

#ifdef OUTPUT_REDIRECTION
    freopen( "out.txt", "w", stdout );
#endif // OUTPUT_REDIRECTION

    while( scanf( "%lld%lld%d", &H, &W, &N ) != EOF ){
        HASHMAP<LLN, int> dict;

        for( int i = 0;i < N;++i ){
            scanf( "%d%d", &record[i].y, &record[i].x );
            --record[i].y;
            --record[i].x;
            LLN hashTemp = getHash( record[i].y, record[i].x );
            dict.insert( make_pair( hashTemp, i ) );
        }

        LLN num[10];
        memset( num, 0, sizeof( num ) );

        for( int t = 0;t < N;++t ){
            for( int yy = record[t].y - 2;yy <= record[t].y;++yy ){
                for( int xx = record[t].x - 2;xx <= record[t].x;++xx ){
                    if( yy < 0 || yy + 3 > H || xx < 0 || xx + 3 > W ){
                        continue;
                    }
                    bool isValid = true;
                    int tarNum = 0;
                    for( int yyy = yy;yyy < yy + 3;++yyy ){
                        for( int xxx = xx;xxx < xx + 3;++xxx ){
                            LLN hashTemp = getHash( yyy, xxx );
                            if( dict.find( hashTemp ) != dict.end() ) {


                                if( !(yyy == record[t].y && xxx == record[t].x) && (dict[hashTemp] < t ) ){
                                    isValid = false;
                                    break;
                                }

                                ++tarNum;

                            }
                        }
                    }



                    if( isValid ){
                        ++num[tarNum];

                        //debug
                    //    printf( "cnt = %d, y = %d, x = %d, yy = %d, xx = %d\n", tarNum, record[t].y, record[t].x, yy, xx ) ;
                    }
                }
            }

        }

        num[0] = ( W - 3 + 1 ) * ( H - 3 + 1 );
        for( int i = 1; i <= 9;++i ){
            num[0] -= num[i];
        }

        for( int i = 0;i <= 9;++i ){
            printf( "%lld\n", num[i] ) ;
        }

    }

#ifdef INPUT_REDIRECTION
    fclose( stdin );
#endif // INPUT_REDIRECTION

#ifdef OUTPUT_REDIRECTION
    fclose( stdout );
#endif // OUTPUT_REDIRECTION

    return 0;
}


Measured memory_bytes: 5156