import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        long d = Long.parseLong(s[1]);
        d *= d;
        int count = 0;
        for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        }
        System.out.print(count);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        long d = Long.parseLong(s[1]);
        d *= d;
        int count = 0;
        for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        }
        System.out.print(count);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        long d = Long.parseLong(s[1]);
        d *= d;
        int count = 0;
        for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        }
        System.out.print(count);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        long d = Long.parseLong(s[1]);
        d *= d;
        int count = 0;
        for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        }
        System.out.print(count);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] s = br.readLine().split(" "); s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n = Integer.parseInt(s[0]); n Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 long d = Long.parseLong(s[1]); d Long.parseLong(s[1]) Long.parseLong Long s[1] s 1 d *= d d d int count = 0; count 0 for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        } {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        } s = br.readLine().split(" ") s br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " long x = Long.parseLong(s[0]); x Long.parseLong(s[0]) Long.parseLong Long s[0] s 0 long y = Long.parseLong(s[1]); y Long.parseLong(s[1]) Long.parseLong Long s[1] s 1 if(x*x + y*y <= d)
                count++; x*x + y*y <= d x*x + y*y x*x x x y*y y y d count++ count System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        long d = Long.parseLong(s[1]);
        d *= d;
        int count = 0;
        for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        }
        System.out.print(count);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        long d = Long.parseLong(s[1]);
        d *= d;
        int count = 0;
        for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        }
        System.out.print(count);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] s = br.readLine().split(" ");
        int n = Integer.parseInt(s[0]);
        long d = Long.parseLong(s[1]);
        d *= d;
        int count = 0;
        for(int i=0; i<n; i++) {
            s = br.readLine().split(" ");
            long x = Long.parseLong(s[0]);
            long y = Long.parseLong(s[1]);
            if(x*x + y*y <= d)
                count++;
        }
        System.out.print(count);
    }
}