function main(input) {
    const args = input.split('\n');
    const Fir = args[0].split(' ');

    const N = parseInt(Fir[0]);
    const H = parseInt(Fir[1]);
    const W = parseInt(Fir[2]);

    var ans = 0;

    for(var i = 1; i <= N; i++) {
        var materials = args[i].split(' ');
        var material_H = parseInt(materials[0]);
        var material_W = parseInt(materials[1]);

        if (H <= material_H && W <= material_W) {
            ans++;
        }
    }
    console.log(ans);

}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));
