function Main(input) {
	input = input.trim().split("\n").map(function(x) { return x.split(" ")});
	let N = parseInt(input[0][0], 10);
	let D = parseInt(input[0][1], 10);
	let tmp;
	let ans = 0;
	for (let i = 0; i < N; i++){
		tmp = input[i + 1].map(e => parseInt(e, 10));
		if (tmp[0] * tmp[0] + tmp[1] * tmp[1] <= D*D) ans++;
	}
	console.log(ans);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
