function Main(input) {
    var maisu = 0;
    var input = input.split("\n");
    var one = input[0].split(" ");
    var N = parseInt(one[0]);
    var H = parseInt(one[1]);
    var W = parseInt(one[2]);
    for(i = 1; i <= N; i++){
        var hantei = input[i].split(" ");
        var A = parseInt(hantei[0]);
        if(H > A) continue;
        var B = parseInt(hantei[1]);
        if(W <= B) maisu++;
    }
	console.log(maisu);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));