n,h,w = gets.chomp.split(" ").map(&:to_i)
al = Array.new(n).map{Array.new(2, 0)}
for i in 0..n - 1
  al[i] = gets.chomp.split(" ").map(&:to_i)
end
ans = 0
for i in 0..n-1
  if al[i][0] >= h && al[i][1] >= w
    ans += 1
  end
end
puts ans
