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

public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        long D = readInt();

        long D_squared = D * D;
        int count = 0;
        for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        }
        System.out.println(count);
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        long D = readInt();

        long D_squared = D * D;
        int count = 0;
        for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        }
        System.out.println(count);
    }
} Main private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) private static StringTokenizer st; st private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    } readInt {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    } while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine()); st == null || !st.hasMoreTokens() st == null st null !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return Integer.parseInt(st.nextToken()); Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st public static void main(String[] args) throws IOException {
        int N = readInt();
        long D = readInt();

        long D_squared = D * D;
        int count = 0;
        for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        }
        System.out.println(count);
    } main {
        int N = readInt();
        long D = readInt();

        long D_squared = D * D;
        int count = 0;
        for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        }
        System.out.println(count);
    } int N = readInt(); N readInt() readInt long D = readInt(); D readInt() readInt long D_squared = D * D; D_squared D * D D D int count = 0; count 0 for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        } {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        } long dx = readInt(); dx readInt() readInt long dy = readInt(); dy readInt() readInt if (dx * dx + dy * dy <= D_squared) count++; dx * dx + dy * dy <= D_squared dx * dx + dy * dy dx * dx dx dx dy * dy dy dy D_squared count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        long D = readInt();

        long D_squared = D * D;
        int count = 0;
        for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        }
        System.out.println(count);
    }
} public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        long D = readInt();

        long D_squared = D * D;
        int count = 0;
        for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        }
        System.out.println(count);
    }
} Main
import java.io.*;
import java.util.*;

public class Main {
    private static final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer st;

    private static int readInt() throws IOException {
        while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
        return Integer.parseInt(st.nextToken());
    }

    public static void main(String[] args) throws IOException {
        int N = readInt();
        long D = readInt();

        long D_squared = D * D;
        int count = 0;
        for (int i = 0; i < N; i++) {
            long dx = readInt();
            long dy = readInt();
            if (dx * dx + dy * dy <= D_squared) count++;
        }
        System.out.println(count);
    }
}
