n, h, w = gets.chomp.split(" ").collect(&:to_i)
as = []
bs = []
n.times {
    a, b = gets.chomp.split(" ").collect(&:to_i)
    as.push a
    bs.push b
}

ans = 0
(0...n).each{ |i|
    if as[i] >= h && bs[i] >= w
        ans += 1
    end
}

puts ans
