/*package whatever //do not write package name here */

import java.io.*;
import java.util.Scanner;


class Main {
	public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	    int n = in.nextInt();
        long d = in.nextLong();
        d = (long ) d * d;
        
        int answer = 0;
        for (int i=0;i<n;i++) {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        }

        System.out.println(answer);
	}
} import java.io.*; io.* java import java.util.Scanner; Scanner java.util class Main {
	public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	    int n = in.nextInt();
        long d = in.nextLong();
        d = (long ) d * d;
        
        int answer = 0;
        for (int i=0;i<n;i++) {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        }

        System.out.println(answer);
	}
} Main public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	    int n = in.nextInt();
        long d = in.nextLong();
        d = (long ) d * d;
        
        int answer = 0;
        for (int i=0;i<n;i++) {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        }

        System.out.println(answer);
	} main {
	    Scanner in = new Scanner(System.in);
	    int n = in.nextInt();
        long d = in.nextLong();
        d = (long ) d * d;
        
        int answer = 0;
        for (int i=0;i<n;i++) {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        }

        System.out.println(answer);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in long d = in.nextLong(); d in.nextLong() in.nextLong in d = (long ) d * d d (long ) d * d (long ) d d int answer = 0; answer 0 for (int i=0;i<n;i++) {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        } {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        } long x = in.nextLong(); x in.nextLong() in.nextLong in long y = in.nextLong(); y in.nextLong() in.nextLong in if (x * x + y * y <= d)
                answer++; x * x + y * y <= d x * x + y * y x * x x x y * y y y d answer++ answer System.out.println(answer) System.out.println System.out System System.out answer String[] args args
/*package whatever //do not write package name here */

import java.io.*;
import java.util.Scanner;


class Main {
	public static void main (String[] args) {
	    Scanner in = new Scanner(System.in);
	    int n = in.nextInt();
        long d = in.nextLong();
        d = (long ) d * d;
        
        int answer = 0;
        for (int i=0;i<n;i++) {
            long x = in.nextLong();
            long y = in.nextLong();
            if (x * x + y * y <= d)
                answer++;
        }

        System.out.println(answer);
	}
}