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

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

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

auto solve( long h, long w, long[ 2 ][] abs )
{
	auto ans = 0L;
	foreach( ab; abs )
	{
		if( h <= ab[ 0 ] && w <= ab[ 1 ] ) ans++;
	}
	return ans;
}
