function main(input) {
    const lines = input.split("\n");
    const ND = new Int32Array(lines[0].split(" "));
    const D2 = ND[1] * ND[1];
    let cnt = 0;
    for (let i = 1; i < lines.length; i++) {
        const arr = new Int32Array(lines[i].split(" "));
        const x = arr[0];
        const y = arr[1];
        const d2 = x * x + y * y;
        cnt += (d2 <= D2) ? 1 : 0;
    }
    return cnt
}

//******************************
exports.main = main;

function Main(input) {
    console.log(main(input.trim()));
}

if (process.argv[2] !== "test") {
    Main(require("fs").readFileSync("/dev/stdin", "utf8"));
}