import java.util.Scanner;
import java.lang.Math;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt(); long D = scan.nextInt();

        int ans = 0;
        for(int i = 0; i < N; i++) {
            long X = scan.nextInt();
            long Y = scan.nextInt();
            if(X*X+Y*Y <= D*D) ans++;
        }

        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt(); long D = scan.nextInt();

        int ans = 0;
        for(int i = 0; i < N; i++) {
            long X = scan.nextInt();
            long Y = scan.nextInt();
            if(X*X+Y*Y <= D*D) ans++;
        }

        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt(); long D = scan.nextInt();

        int ans = 0;
        for(int i = 0; i < N; i++) {
            long X = scan.nextInt();
            long Y = scan.nextInt();
            if(X*X+Y*Y <= D*D) ans++;
        }

        System.out.println(ans);
    } main {
        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt(); long D = scan.nextInt();

        int ans = 0;
        for(int i = 0; i < N; i++) {
            long X = scan.nextInt();
            long Y = scan.nextInt();
            if(X*X+Y*Y <= D*D) ans++;
        }

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

        int N = scan.nextInt(); long D = scan.nextInt();

        int ans = 0;
        for(int i = 0; i < N; i++) {
            long X = scan.nextInt();
            long Y = scan.nextInt();
            if(X*X+Y*Y <= D*D) ans++;
        }

        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt(); long D = scan.nextInt();

        int ans = 0;
        for(int i = 0; i < N; i++) {
            long X = scan.nextInt();
            long Y = scan.nextInt();
            if(X*X+Y*Y <= D*D) ans++;
        }

        System.out.println(ans);
    }
} Main
import java.util.Scanner;
import java.lang.Math;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int N = scan.nextInt(); long D = scan.nextInt();

        int ans = 0;
        for(int i = 0; i < N; i++) {
            long X = scan.nextInt();
            long Y = scan.nextInt();
            if(X*X+Y*Y <= D*D) ans++;
        }

        System.out.println(ans);
    }
}