object Main extends App {
  val in = scala.io.Source.stdin.getLines().toIndexedSeq
  .map(_.split(' ').map(_.toInt))
  val in0 = in.head
  val H = in0(1)
  val W = in0(2)
  val ls = in.tail
  
  val ret = ls.count(e => e(0) >= H && e(1) >= W)
  println(ret)
}
