import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d = sc.nextInt();
        int[][] arr = new int[n][2];

        for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        }
        int cnt = 0;

        for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        }

        System.out.println(cnt);


        
    }
    
} 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();
        int d = sc.nextInt();
        int[][] arr = new int[n][2];

        for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        }
        int cnt = 0;

        for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        }

        System.out.println(cnt);


        
    }
    
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d = sc.nextInt();
        int[][] arr = new int[n][2];

        for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        }
        int cnt = 0;

        for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        }

        System.out.println(cnt);


        
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d = sc.nextInt();
        int[][] arr = new int[n][2];

        for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        }
        int cnt = 0;

        for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        }

        System.out.println(cnt);


        
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc int[][] arr = new int[n][2]; arr new int[n][2] n 2 for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        } int i = 0; int i = 0; i 0 i< n i n i++ i++ i {
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        } {
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        } for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            } int j=0; int j=0; j 0 j<2 j 2 j++ j++ j {
                arr[i][j] = sc.nextInt();
            } {
                arr[i][j] = sc.nextInt();
            } arr[i][j] = sc.nextInt() arr[i][j] arr[i] arr i j sc.nextInt() sc.nextInt sc int cnt = 0; cnt 0 for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        } {
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        } long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2)); di (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2)) Math.pow(arr[i][0], 2) Math.pow Math arr[i][0] arr[i] arr i 0 2 Math.pow(arr[i][1], 2) Math.pow Math arr[i][1] arr[i] arr i 1 2 if(di <= (long)Math.pow(d,2)){
                cnt++;
            } di <= (long)Math.pow(d,2) di (long)Math.pow(d,2) Math.pow Math d 2 {
                cnt++;
            } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d = sc.nextInt();
        int[][] arr = new int[n][2];

        for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        }
        int cnt = 0;

        for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        }

        System.out.println(cnt);


        
    }
    
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d = sc.nextInt();
        int[][] arr = new int[n][2];

        for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        }
        int cnt = 0;

        for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        }

        System.out.println(cnt);


        
    }
    
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int d = sc.nextInt();
        int[][] arr = new int[n][2];

        for(int i = 0; i< n; i++){
            for(int j=0; j<2; j++){
                arr[i][j] = sc.nextInt();
            }
        }
        int cnt = 0;

        for(int i = 0; i<n; i++){
            long di = (long)(Math.pow(arr[i][0], 2)+Math.pow(arr[i][1], 2));
            //System.out.println(di);
            if(di <= (long)Math.pow(d,2)){
                cnt++;
            }
        }

        System.out.println(cnt);


        
    }
    
}