import java.util.Scanner
import scala.util.control.Breaks

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val N, H, W = sc.nextInt

    var ans = 0
    for (i <- 1 to N) {
      val A, B = sc.nextInt
      if ((A >= H) && (B >= W)) {
        ans += 1
      }
    }

    println(ans)
  }
}