fun main(args : Array<String>) {
    val (n, h, w) = readLine()!!.split(" ").map{it.toInt()}

    var cnt = 0
    repeat(n) {
        val (h2, w2) = readLine()!!.split(" ").map{it.toInt()}
        if (h2 >= h && w2 >= w) cnt++
    }

    println(cnt)
}