import java.util.*;

public class Main{
    public static int calculatePoints(int n,int d,int[] a,int[] b){
        int ret = 0;
        for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        }
        return ret;
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = 0,D = 0;
        int[] X = new int[1];
        int[] Y = new int[1];

        while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        }
        sc.close();
        System.out.println(calculatePoints(N,D,X,Y));

        /*int N = 12;
        int D = 3;
        int[] X = {1,1,1,1,1,1,2,2,2,3,3,3};
        int[] Y = {1,1,1,1,2,3,1,2,3,1,2,3};
        System.out.println(calculatePoints(N,D,X,Y));*/
    }
} import java.util.*; util.* java public class Main{
    public static int calculatePoints(int n,int d,int[] a,int[] b){
        int ret = 0;
        for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        }
        return ret;
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = 0,D = 0;
        int[] X = new int[1];
        int[] Y = new int[1];

        while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        }
        sc.close();
        System.out.println(calculatePoints(N,D,X,Y));

        /*int N = 12;
        int D = 3;
        int[] X = {1,1,1,1,1,1,2,2,2,3,3,3};
        int[] Y = {1,1,1,1,2,3,1,2,3,1,2,3};
        System.out.println(calculatePoints(N,D,X,Y));*/
    }
} Main public static int calculatePoints(int n,int d,int[] a,int[] b){
        int ret = 0;
        for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        }
        return ret;
    } calculatePoints {
        int ret = 0;
        for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        }
        return ret;
    } int ret = 0; ret 0 for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        } {
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        } if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++; (long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d (long)a[i]*a[i]+(long)b[i]*b[i] (long)a[i]*a[i] (long)a[i] a i a[i] a i (long)b[i]*b[i] (long)b[i] b i b[i] b i (long)d*d (long)d d ret++ ret return ret; ret int n n int d d int[] a a int[] b b public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = 0,D = 0;
        int[] X = new int[1];
        int[] Y = new int[1];

        while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        }
        sc.close();
        System.out.println(calculatePoints(N,D,X,Y));

        /*int N = 12;
        int D = 3;
        int[] X = {1,1,1,1,1,1,2,2,2,3,3,3};
        int[] Y = {1,1,1,1,2,3,1,2,3,1,2,3};
        System.out.println(calculatePoints(N,D,X,Y));*/
    } main {
        Scanner sc = new Scanner(System.in);
        int N = 0,D = 0;
        int[] X = new int[1];
        int[] Y = new int[1];

        while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        }
        sc.close();
        System.out.println(calculatePoints(N,D,X,Y));

        /*int N = 12;
        int D = 3;
        int[] X = {1,1,1,1,1,1,2,2,2,3,3,3};
        int[] Y = {1,1,1,1,2,3,1,2,3,1,2,3};
        System.out.println(calculatePoints(N,D,X,Y));*/
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = 0 N 0 D = 0; D 0 int[] X = new int[1]; X new int[1] 1 int[] Y = new int[1]; Y new int[1] 1 while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        } sc.hasNext() sc.hasNext sc {
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        } N = sc.nextInt() N sc.nextInt() sc.nextInt sc D = sc.nextInt() D sc.nextInt() sc.nextInt sc X = new int[N] X new int[N] N Y = new int[N] Y new int[N] N for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            } int i=0; int i=0; i 0 i<N i N i++ i++ i {
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            } {
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            } X[i] = sc.nextInt() X[i] X i sc.nextInt() sc.nextInt sc Y[i] = sc.nextInt() Y[i] Y i sc.nextInt() sc.nextInt sc sc.close() sc.close sc System.out.println(calculatePoints(N,D,X,Y)) System.out.println System.out System System.out calculatePoints(N,D,X,Y) calculatePoints N D X Y String[] args args public class Main{
    public static int calculatePoints(int n,int d,int[] a,int[] b){
        int ret = 0;
        for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        }
        return ret;
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = 0,D = 0;
        int[] X = new int[1];
        int[] Y = new int[1];

        while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        }
        sc.close();
        System.out.println(calculatePoints(N,D,X,Y));

        /*int N = 12;
        int D = 3;
        int[] X = {1,1,1,1,1,1,2,2,2,3,3,3};
        int[] Y = {1,1,1,1,2,3,1,2,3,1,2,3};
        System.out.println(calculatePoints(N,D,X,Y));*/
    }
} public class Main{
    public static int calculatePoints(int n,int d,int[] a,int[] b){
        int ret = 0;
        for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        }
        return ret;
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = 0,D = 0;
        int[] X = new int[1];
        int[] Y = new int[1];

        while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        }
        sc.close();
        System.out.println(calculatePoints(N,D,X,Y));

        /*int N = 12;
        int D = 3;
        int[] X = {1,1,1,1,1,1,2,2,2,3,3,3};
        int[] Y = {1,1,1,1,2,3,1,2,3,1,2,3};
        System.out.println(calculatePoints(N,D,X,Y));*/
    }
} Main
import java.util.*;

public class Main{
    public static int calculatePoints(int n,int d,int[] a,int[] b){
        int ret = 0;
        for(int i=0;i<n;i++){
            if((long)a[i]*a[i]+(long)b[i]*b[i]<=(long)d*d) ret++;
        }
        return ret;
    }

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = 0,D = 0;
        int[] X = new int[1];
        int[] Y = new int[1];

        while(sc.hasNext()){
            N = sc.nextInt();
            D = sc.nextInt();
            X = new int[N];
            Y = new int[N];
            for(int i=0;i<N;i++){
                X[i] = sc.nextInt();;
                Y[i] = sc.nextInt();
            }
        }
        sc.close();
        System.out.println(calculatePoints(N,D,X,Y));

        /*int N = 12;
        int D = 3;
        int[] X = {1,1,1,1,1,1,2,2,2,3,3,3};
        int[] Y = {1,1,1,1,2,3,1,2,3,1,2,3};
        System.out.println(calculatePoints(N,D,X,Y));*/
    }
}
