let ND: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
var count: Int = 0
for _ in 1...ND[0] {
    let xy: [Int] = readLine()!.split(separator: " ").map { Int($0)! }
    let dist: Int = xy[0]*xy[0] + xy[1]*xy[1]
    if dist <= ND[1]*ND[1] { count += 1}
}
print(count)	// (๑•ૅㅁ•๑)