fun main() {
    val (n, d) = readLongs()
    var s = 0
    repeat(n.toInt()) {
        val (x, y) = readLongs()
        if (x * x + y * y <= d * d) s++
    }
    println(s)
}

private fun readInt() = readLine()!!.toInt()
private fun readInts() = readLine()!!.split(" ").map { it.toInt() }
private fun readLongs() = readLine()!!.split(" ").map { it.toLong() }
