This page is still under construction.

Parts of this page are still being built. What you see may change.

Lifeguard

Interview

Time limit1sMemory limit512 MB

Summary
The task is to count children farther than k meters from the lifeguard position.
Level

Easy1 of 10

Topics
Geometry, Math
Solved
No attempts yet

Problem

Children are spending their holidays at the seaside, and right now they are all bathing in the water. A lifeguard keeps them safe, and his range of sight is kk meters. Anyone located more than kk meters away from the lifeguard is invisible to him. Given the positions of the lifeguard and the children, determine how many children would not receive help if something dangerous happened.

Input

The first line contains integers nn, kk, xx, yy (1≤n,k≤1000001 \le n, k \le 100000, 0≤x,y≤100000 \le x, y \le 10000), denoting the number of children, the lifeguard's range of sight, and the lifeguard's position (x,y)(x, y), respectively. Each of the next nn lines contains two integers xix_i and yiy_i (0≤xi,yi≤100000 \le x_i, y_i \le 10000), the coordinates of the ii-th child. (The bathing area is described on a coordinate plane.)

Output

Print, on a single line, the number of children who cannot feel safe, that is, the number of children who lie outside the lifeguard's range of sight.

Examples2

  1. Example 1

    Input
    5 3 2 2
    2 4
    2 6
    3 3
    4 2
    5 6
    
    Expected output
    2
    
  2. Example 2

    Input
    1 5 0 0
    3 4
    
    Expected output
    0