import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int D = scan.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int D = scan.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int D = scan.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        }
        System.out.println(count);
    } main {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int D = scan.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        }
        System.out.println(count);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int D = scan.nextInt(); D scan.nextInt() scan.nextInt scan int count = 0; count 0 for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        } {
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        } int x = scan.nextInt(); x scan.nextInt() scan.nextInt scan int y = scan.nextInt(); y scan.nextInt() scan.nextInt scan double d = (Math.pow(x, 2) + Math.pow(y, 2)); d (Math.pow(x, 2) + Math.pow(y, 2)) Math.pow(x, 2) Math.pow Math x 2 Math.pow(y, 2) Math.pow Math y 2 if(Math.pow(D, 2) >= d) count++; Math.pow(D, 2) >= d Math.pow(D, 2) Math.pow Math D 2 d count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int D = scan.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int D = scan.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        }
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int D = scan.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            int x = scan.nextInt();
            int y = scan.nextInt();
            double d = (Math.pow(x, 2) + Math.pow(y, 2));
            if(Math.pow(D, 2) >= d) count++;
        }
        System.out.println(count);
    }
}
