import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); long d = sc.nextInt();
        long dist = d*d;
        int ans = 0;
        for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); long d = sc.nextInt();
        long dist = d*d;
        int ans = 0;
        for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); long d = sc.nextInt();
        long dist = d*d;
        int ans = 0;
        for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); long d = sc.nextInt();
        long dist = d*d;
        int ans = 0;
        for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long dist = d*d; dist d*d d d int ans = 0; ans 0 for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        } {
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        } long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc if((a*a)+(b*b) <= dist){
                ans++;
            } (a*a)+(b*b) <= dist (a*a)+(b*b) (a*a) a a (b*b) b b dist {
                ans++;
            } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans 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.nextInt();
        long dist = d*d;
        int ans = 0;
        for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); long d = sc.nextInt();
        long dist = d*d;
        int ans = 0;
        for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        }
        System.out.println(ans);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt(); long d = sc.nextInt();
        long dist = d*d;
        int ans = 0;
        for(int i=0;i<n;i++){
            long a = sc.nextInt(); long b = sc.nextInt();
            if((a*a)+(b*b) <= dist){
                ans++;
            }
        }
        System.out.println(ans);
    }
}
