let i=readLine()!.characters.split(" ").map{Int(String($0))!},N=i[0],H=i[1],W=i[2]
var ans=0
for _ in 0..<N {
  let i=readLine()!.characters.split(" ").map{Int(String($0))!}
  if i[0]>=H&&i[1]>=W{ans++}
}
print(ans)