import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        long D = sc.nextLong();
        long[] X = new long[N];
        long[] Y = new long[N];
        for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        }
        int res=0;
        for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        }
		System.out.println(res);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        long D = sc.nextLong();
        long[] X = new long[N];
        long[] Y = new long[N];
        for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        }
        int res=0;
        for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        }
		System.out.println(res);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        long D = sc.nextLong();
        long[] X = new long[N];
        long[] Y = new long[N];
        for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        }
        int res=0;
        for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        }
		System.out.println(res);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        long D = sc.nextLong();
        long[] X = new long[N];
        long[] Y = new long[N];
        for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        }
        int res=0;
        for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        }
		System.out.println(res);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long D = sc.nextLong(); D sc.nextLong() sc.nextLong sc long[] X = new long[N]; X new long[N] N long[] Y = new long[N]; Y new long[N] N for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        } {
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        } X[i] = sc.nextLong() X[i] X i sc.nextLong() sc.nextLong sc Y[i] = sc.nextLong() Y[i] Y i sc.nextLong() sc.nextLong sc int res=0; res 0 for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        } int j=0; int j=0; j 0 j<N j N j++ j++ j {
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        } {
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        } if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            } Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2) Math.pow(X[j],2)+Math.pow(Y[j],2) Math.pow(X[j],2) Math.pow Math X[j] X j 2 Math.pow(Y[j],2) Math.pow Math Y[j] Y j 2 Math.pow(D,2) Math.pow Math D 2 {
                res++;
            } res++ res System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        long D = sc.nextLong();
        long[] X = new long[N];
        long[] Y = new long[N];
        for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        }
        int res=0;
        for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        }
		System.out.println(res);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        long D = sc.nextLong();
        long[] X = new long[N];
        long[] Y = new long[N];
        for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        }
        int res=0;
        for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        }
		System.out.println(res);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
        long D = sc.nextLong();
        long[] X = new long[N];
        long[] Y = new long[N];
        for(int i=0; i<N; i++){
            X[i] = sc.nextLong();
            Y[i] = sc.nextLong();
        }
        int res=0;
        for(int j=0; j<N; j++){
            if(Math.pow(X[j],2)+Math.pow(Y[j],2)<=Math.pow(D,2)){
                res++;
            }
        }
		System.out.println(res);
	}
}