func readIntPair() -> (Int, Int) {
    let line = readLine()!.split(separator: " ").map({Int($0)!})
    return (line[0], line[1])
}

func readDistSquare() -> Int {
    let (X, Y) = readIntPair()
    return X * X + Y * Y
}

let (N, D) = readIntPair()
let threshold = D * D
print((1...N).reduce(0) { i, j in
    i + (threshold < readDistSquare() ? 0 : 1)
})
