#!/usr/bin/env ruby

(n, h, w) = gets.chomp.split(/ /).map(&:to_i)
goukin = []
n.times do
  (a, b) = gets.chomp.split(/ /).map(&:to_i)
  goukin << [a, b]
end

goukin.select!{|g| g[0] >= h && g[1] >= w}

puts goukin.size