function main(arg) {
    arg = arg.split("\n");
    var N = parseInt(arg[0].split(" ")[0]);
    var H = parseInt(arg[0].split(" ")[1]);
    var W = parseInt(arg[0].split(" ")[2]);
    
    var count = 0;
    arg.shift();

    
    for(var i=0; i<arg.length; i++) {
        var h = parseInt(arg[i].split(" ")[0]);
        var w = parseInt(arg[i].split(" ")[1]);
        
        if( h >= H && w >= W ) {
            count++;
        }
    }
    
    console.log(count);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
