import Foundation

func main() {
    var inputString = readLine()!
    var split: [Int] = inputString.components(separatedBy: " ").map{Int(String($0))!}
    
    let n = split[0]
    let d = split[1]
    let distance = d*d
    var res = 0
    
    for _ in 1...n {
        inputString = readLine()!
        split = inputString.components(separatedBy: " ").map{Int(String($0))!}
        
        let h = split[0]
        let w = split[1]
        
        if (h*h+w*w <= distance) {
            res += 1
        }
    }
    
    print(res)
}

main()