object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val N, H, W = sc.nextInt()
  println {
    List.fill(N)(sc.nextInt() -> sc.nextInt()).count {
      case (h, w) => H <= h && W <= w
    }
  }
}
