
import java.io.PrintWriter;
import java.util.*;

public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        long d = sc.nextLong();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        }
        System.out.println(ans);

        // out.println("Hello World");
        out.flush();
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        long d = sc.nextLong();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        }
        System.out.println(ans);

        // out.println("Hello World");
        out.flush();
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        long d = sc.nextLong();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        }
        System.out.println(ans);

        // out.println("Hello World");
        out.flush();
    } run {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        long d = sc.nextLong();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        }
        System.out.println(ans);

        // out.println("Hello World");
        out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc int ans = 0; ans 0 for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            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 = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        } {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        } long x = sc.nextLong(); x sc.nextLong() sc.nextLong sc long y = sc.nextLong(); y sc.nextLong() sc.nextLong sc 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++ ans System.out.println(ans) System.out.println System.out System System.out ans out.flush() out.flush out void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    } debug {
        System.err.println(Arrays.deepToString(os));
    } System.err.println(Arrays.deepToString(os)) System.err.println System.err System System.err Arrays.deepToString(os) Arrays.deepToString Arrays os Object... os os public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        long d = sc.nextLong();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        }
        System.out.println(ans);

        // out.println("Hello World");
        out.flush();
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        long d = sc.nextLong();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        }
        System.out.println(ans);

        // out.println("Hello World");
        out.flush();
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
} Main

import java.io.PrintWriter;
import java.util.*;

public class Main {
    void run() {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);

        int n = sc.nextInt();
        long d = sc.nextLong();
        int ans = 0;
        for (int i = 0; i < n; i++) {
            long x = sc.nextLong();
            long y = sc.nextLong();
            if (x * x + y * y <= d * d) {
                ans++;
            }
        }
        System.out.println(ans);

        // out.println("Hello World");
        out.flush();
    }

    void debug(Object... os) {
        System.err.println(Arrays.deepToString(os));
    }

    public static void main(String[] args) {
        new Main().run();
    }
}
