N,H,W = gets.chomp.split(" ").map(&:to_i)
boards = []
num = 0
N.times do
  boards << gets.chomp.split(" ").map(&:to_i)
end
for i in 0...N
  num += 1 if boards[i][0] >= H && boards[i][1] >= W
end
puts num