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

    var count = 0
    repeat(n){
        val (a,b) = readLine()!!.split(" ").map { i->i.toInt() }
        if(a>=h && b>=w)count++
    }
    println(count)

}