object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n, h, w = sc.nextInt()
    val list = List.fill(n)((sc.nextInt, sc.nextInt))
    println(list.foldLeft(0)((sum: Int, p: (Int, Int)) => sum + (if (p._1 >= h && p._2 >= w) 1 else 0)))
  }
}