input = gets.to_s
numOfPlate = input.split(" ")[0].to_i
heightOfPlate = input.split(" ")[1].to_i
lengthOfPlate = input.split(" ")[2].to_i

numOfPlateOfAccept = 0

for times in 1..numOfPlate do
 inputSize = gets.to_s
 inputHeight = inputSize.split(" ")[0].to_i
 inputWidth  = inputSize.split(" ")[1].to_i

 if inputHeight >= heightOfPlate && inputWidth >= lengthOfPlate then
   numOfPlateOfAccept = numOfPlateOfAccept + 1
 end

 inputSize = []
 inputWidth = 0
 inputHeight = 0

end

p numOfPlateOfAccept