function main(arg) {
	var header = arg.split("\n")[0].split(" ")

	var N = header[0]
	var H = Number(header[1])
	var W = Number(header[2])
	var count = 0
	arg = arg.split("\n")
	arg.shift()

	arg = arg.map(e => e.split(" ").map(ee => Number(ee)))

	for (var i = 0; i < arg.length; i++) {
		var row = arg[i]
		if (row[0] >= H && row[1] >= W) {
			count++
		}
	}

	console.log(count)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));