import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        long D = scanner.nextLong();
        long D2 = D * D;

        long[] X = new long[N];
        long[] Y = new long[N];

        for (int i = 0; i < N; i++) {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        }

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

        System.out.println(result);
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        long D = scanner.nextLong();
        long D2 = D * D;

        long[] X = new long[N];
        long[] Y = new long[N];

        for (int i = 0; i < N; i++) {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        }

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

        System.out.println(result);
    }

} Main public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        long D = scanner.nextLong();
        long D2 = D * D;

        long[] X = new long[N];
        long[] Y = new long[N];

        for (int i = 0; i < N; i++) {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        }

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

        System.out.println(result);
    } main {
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        long D = scanner.nextLong();
        long D2 = D * D;

        long[] X = new long[N];
        long[] Y = new long[N];

        for (int i = 0; i < N; i++) {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        }

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

        System.out.println(result);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner long D = scanner.nextLong(); D scanner.nextLong() scanner.nextLong scanner long D2 = D * D; D2 D * D D D 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] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        } {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        } X[i] = scanner.nextLong() X[i] X i scanner.nextLong() scanner.nextLong scanner Y[i] = scanner.nextLong() Y[i] Y i scanner.nextLong() scanner.nextLong scanner int result = 0; result 0 for (int i = 0; i < N; i++) {
            if (X[i]*X[i] + Y[i]*Y[i] <= D2) {
                result++;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (X[i]*X[i] + Y[i]*Y[i] <= D2) {
                result++;
            }
        } {
            if (X[i]*X[i] + Y[i]*Y[i] <= D2) {
                result++;
            }
        } if (X[i]*X[i] + Y[i]*Y[i] <= D2) {
                result++;
            } X[i]*X[i] + Y[i]*Y[i] <= D2 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 D2 {
                result++;
            } result++ result System.out.println(result) System.out.println System.out System System.out result String[] args args public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        long D = scanner.nextLong();
        long D2 = D * D;

        long[] X = new long[N];
        long[] Y = new long[N];

        for (int i = 0; i < N; i++) {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        }

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

        System.out.println(result);
    }

} public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        long D = scanner.nextLong();
        long D2 = D * D;

        long[] X = new long[N];
        long[] Y = new long[N];

        for (int i = 0; i < N; i++) {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        }

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

        System.out.println(result);
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        int N = scanner.nextInt();
        long D = scanner.nextLong();
        long D2 = D * D;

        long[] X = new long[N];
        long[] Y = new long[N];

        for (int i = 0; i < N; i++) {
            X[i] = scanner.nextLong();
            Y[i] = scanner.nextLong();
        }

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

        System.out.println(result);
    }

}
