import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        }
    } main {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        }
    } try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        } {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) 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[] 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.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 int count = 0; count 0 for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            } {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            } if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                } X[i] * X[i] + Y[i] * Y[i] <= D * D X[i] * X[i] + Y[i] * Y[i] X[i] * X[i] X[i] X i X[i] X i Y[i] * Y[i] Y[i] Y i Y[i] Y i D * D D D {
                    count++;
                } 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) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        try (Scanner sc = new Scanner(System.in)) {
            int N = sc.nextInt();
            long D = sc.nextInt();
            long[] X = new long[N];
            long[] Y = new long[N];
            for (int i = 0; i < N; i++) {
                X[i] = sc.nextInt();
                Y[i] = sc.nextInt();
            }

            int count = 0;
            for (int i = 0; i < N; i++) {
                if (X[i] * X[i] + Y[i] * Y[i] <= D * D) {
                    count++;
                }
            }

            System.out.println(count);
        }
    }
}
