unittest
{
	assert( [ "4 5 8", "1 1", "1 4", "1 5", "2 3", "3 1", "3 2", "3 4", "4 4" ].parse.expand.solve == "0\n0\n0\n2\n4\n0\n0\n0\n0\n0" );
	assert( [ "10 10 20", "1 1", "1 4", "1 9", "2 5", "3 10", "4 2", "4 7", "5 9", "6 4", "6 6", "6 7", "7 1", "7 3", "7 7", "8 1", "8 5", "8 10", "9 2", "10 4", "10 9" ].parse.expand.solve == "4\n26\n22\n10\n2\n0\n0\n0\n0\n0" );
	assert( [ "1000000000 1000000000 0" ].parse.expand.solve == "999999996000000004\n0\n0\n0\n0\n0\n0\n0\n0\n0" );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto hwn = input.front.split.to!( long[] );
	auto abs = new long[ 2 ][ hwn[ 2 ] ];
	foreach( ref ab; abs )
	{
		input.popFront;
		ab = input.front.split.to!( long[] );
	}
	return tuple( hwn[ 0 ], hwn[ 1 ], abs );
}

auto solve( long h, long w, long[ 2 ][] abs )
{
	auto cs = new long[ 2 ][ abs.length * 9 ];
	auto ci = 0L;
	foreach( ab; abs )
	{
		auto ym = min( h - 2, ab[ 0 ] );
		auto xm = min( w - 2, ab[ 1 ] );
		for( auto y = max( 1L, ab[ 0 ] - 2 ); y <= ym; y++ )
		{
			for( auto x = max( 1L, ab[ 1 ] - 2 ); x <= xm; x++ )
			{
				cs[ ci ] = [ y, x ];
				ci++;
			}
		}
	}
	cs.length = ci;
	cs.sort();
	
	auto anss = new long[ 10 ];
	anss[ 0 ] = ( h - 2 ) * ( w - 2 );
	foreach( g; cs.group )
	{
		anss[ 0 ]--;
		anss[ g[ 1 ] ]++; 
	}
	return anss.to!( string[] ).join( "\n" );
}
