fun main(args: Array<String>) {
    val input1: String? = readLine()
    val tmp = input1!!.split(" ")
    val n = Integer.parseInt(tmp[0])
    val h = Integer.parseInt(tmp[1])
    val w = Integer.parseInt(tmp[2])
    var count = 0

    for(i in 0..(n-1)){
        val input2: String? = readLine()
        val tmp2 = input2!!.split(" ")
        val a = Integer.parseInt(tmp2[0])
        val b = Integer.parseInt(tmp2[1])
        if(h <= a && w <= b) count++
    }

    println(count)
}