import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Objects;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDistance solver = new BDistance();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDistance {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        }

    }

    static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }

    static class Point implements Comparable<Point> {
        public long x;
        public long y;

        public Point(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public static Point read(InputReader in) {
            return new Point(in.nextLong(), in.nextLong());
        }

        public static Point[] readPoints(InputReader in, int n) {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        }

        public long norm() {
            return x * x + y * y;
        }

        public String toString() {
            return String.format("(%d, %d)", x, y);
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public int compareTo(Point o) {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        }

    }
}
 import java.io.OutputStream; OutputStream java.io import java.io.IOException; IOException java.io import java.io.InputStream; InputStream java.io import java.io.PrintWriter; PrintWriter java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Objects; Objects java.util import java.util.StringTokenizer; StringTokenizer java.util import java.io.BufferedReader; BufferedReader java.io import java.io.InputStream; InputStream java.io public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDistance solver = new BDistance();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDistance {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        }

    }

    static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }

    static class Point implements Comparable<Point> {
        public long x;
        public long y;

        public Point(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public static Point read(InputReader in) {
            return new Point(in.nextLong(), in.nextLong());
        }

        public static Point[] readPoints(InputReader in, int n) {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        }

        public long norm() {
            return x * x + y * y;
        }

        public String toString() {
            return String.format("(%d, %d)", x, y);
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public int compareTo(Point o) {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        }

    }
} Main public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDistance solver = new BDistance();
        solver.solve(1, in, out);
        out.close();
    } main {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDistance solver = new BDistance();
        solver.solve(1, in, out);
        out.close();
    } InputStream inputStream = System.in; inputStream System.in System System.in OutputStream outputStream = System.out; outputStream System.out System System.out InputReader in = new InputReader(inputStream); in new InputReader(inputStream) PrintWriter out = new PrintWriter(outputStream); out new PrintWriter(outputStream) BDistance solver = new BDistance(); solver new BDistance() solver.solve(1, in, out) solver.solve solver 1 in out out.close() out.close out String[] args args static class BDistance {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        }

    } BDistance public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        } solve {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        } int n = in.nextInt(); n in.nextInt() in.nextInt in long d = in.nextInt(); d in.nextInt() in.nextInt in d = d * d d d * d d d Point[] points = Point.readPoints(in, n); points Point.readPoints(in, n) Point.readPoints Point in n int answer = 0; answer 0 for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            } Point p points {
                if (p.norm() <= d)
                    answer++;
            } {
                if (p.norm() <= d)
                    answer++;
            } if (p.norm() <= d)
                    answer++; p.norm() <= d p.norm() p.norm p d answer++ answer out.println(answer) out.println out answer int testNumber testNumber InputReader in in PrintWriter out out static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    } InputReader public final BufferedReader reader; reader public StringTokenizer tokenizer; tokenizer public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } InputReader {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        } reader = new BufferedReader(new InputStreamReader(stream), 32768) reader new BufferedReader(new InputStreamReader(stream), 32768) tokenizer = null tokenizer null InputStream stream stream public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } next {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        } while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } tokenizer == null || !tokenizer.hasMoreTokens() tokenizer == null tokenizer null !tokenizer.hasMoreTokens() tokenizer.hasMoreTokens() tokenizer.hasMoreTokens tokenizer {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            } try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } catch (IOException e) {
                    throw new RuntimeException(e);
                } IOException e {
                    throw new RuntimeException(e);
                } throw new RuntimeException(e); new RuntimeException(e) {
                    tokenizer = new StringTokenizer(reader.readLine());
                } tokenizer = new StringTokenizer(reader.readLine()) tokenizer new StringTokenizer(reader.readLine()) return tokenizer.nextToken(); tokenizer.nextToken() tokenizer.nextToken tokenizer public int nextInt() {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public long nextLong() {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next static class Point implements Comparable<Point> {
        public long x;
        public long y;

        public Point(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public static Point read(InputReader in) {
            return new Point(in.nextLong(), in.nextLong());
        }

        public static Point[] readPoints(InputReader in, int n) {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        }

        public long norm() {
            return x * x + y * y;
        }

        public String toString() {
            return String.format("(%d, %d)", x, y);
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public int compareTo(Point o) {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        }

    } Point public long x; x public long y; y public Point(long x, long y) {
            this.x = x;
            this.y = y;
        } Point {
            this.x = x;
            this.y = y;
        } this.x = x this.x this this.x x this.y = y this.y this this.y y long x x long y y public static Point read(InputReader in) {
            return new Point(in.nextLong(), in.nextLong());
        } read {
            return new Point(in.nextLong(), in.nextLong());
        } return new Point(in.nextLong(), in.nextLong()); new Point(in.nextLong(), in.nextLong()) InputReader in in public static Point[] readPoints(InputReader in, int n) {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        } readPoints {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        } Point[] p = new Point[n]; p new Point[n] n for (int i = 0; i < n; i++) {
                p[i] = read(in);
            } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
                p[i] = read(in);
            } {
                p[i] = read(in);
            } p[i] = read(in) p[i] p i read(in) read in return p; p InputReader in in int n n public long norm() {
            return x * x + y * y;
        } norm {
            return x * x + y * y;
        } return x * x + y * y; x * x + y * y x * x x x y * y y y public String toString() {
            return String.format("(%d, %d)", x, y);
        } toString {
            return String.format("(%d, %d)", x, y);
        } return String.format("(%d, %d)", x, y); String.format("(%d, %d)", x, y) String.format String "(%d, %d)" x y public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        } equals {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        } if (this == o)
                return true; this == o this o return true; true if (o == null || getClass() != o.getClass())
                return false; o == null || getClass() != o.getClass() o == null o null getClass() != o.getClass() getClass() getClass o.getClass() o.getClass o return false; false Point point = (Point) o; point (Point) o return x == point.x && y == point.y; x == point.x && y == point.y x == point.x x point.x point point.x y == point.y y point.y point point.y Object o o public int hashCode() {
            return Objects.hash(x, y);
        } hashCode {
            return Objects.hash(x, y);
        } return Objects.hash(x, y); Objects.hash(x, y) Objects.hash Objects x y public int compareTo(Point o) {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        } compareTo {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        } int ret = Long.compare(x, o.x); ret Long.compare(x, o.x) Long.compare Long x o.x o o.x if (ret != 0)
                return ret; ret != 0 ret 0 return ret; ret return Long.compare(y, o.y); Long.compare(y, o.y) Long.compare Long y o.y o o.y Point o o Comparable public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDistance solver = new BDistance();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDistance {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        }

    }

    static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }

    static class Point implements Comparable<Point> {
        public long x;
        public long y;

        public Point(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public static Point read(InputReader in) {
            return new Point(in.nextLong(), in.nextLong());
        }

        public static Point[] readPoints(InputReader in, int n) {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        }

        public long norm() {
            return x * x + y * y;
        }

        public String toString() {
            return String.format("(%d, %d)", x, y);
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public int compareTo(Point o) {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        }

    }
} public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDistance solver = new BDistance();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDistance {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        }

    }

    static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }

    static class Point implements Comparable<Point> {
        public long x;
        public long y;

        public Point(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public static Point read(InputReader in) {
            return new Point(in.nextLong(), in.nextLong());
        }

        public static Point[] readPoints(InputReader in, int n) {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        }

        public long norm() {
            return x * x + y * y;
        }

        public String toString() {
            return String.format("(%d, %d)", x, y);
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public int compareTo(Point o) {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        }

    }
} Main
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Objects;
import java.util.StringTokenizer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        BDistance solver = new BDistance();
        solver.solve(1, in, out);
        out.close();
    }

    static class BDistance {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            long d = in.nextInt();
            d = d * d;
            Point[] points = Point.readPoints(in, n);

            int answer = 0;
            for (Point p : points) {
                if (p.norm() <= d)
                    answer++;
            }

            out.println(answer);
        }

    }

    static class InputReader {
        public final BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

    }

    static class Point implements Comparable<Point> {
        public long x;
        public long y;

        public Point(long x, long y) {
            this.x = x;
            this.y = y;
        }

        public static Point read(InputReader in) {
            return new Point(in.nextLong(), in.nextLong());
        }

        public static Point[] readPoints(InputReader in, int n) {
            Point[] p = new Point[n];
            for (int i = 0; i < n; i++) {
                p[i] = read(in);
            }
            return p;
        }

        public long norm() {
            return x * x + y * y;
        }

        public String toString() {
            return String.format("(%d, %d)", x, y);
        }

        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Point point = (Point) o;
            return x == point.x && y == point.y;
        }

        public int hashCode() {
            return Objects.hash(x, y);
        }

        public int compareTo(Point o) {
            int ret = Long.compare(x, o.x);
            if (ret != 0)
                return ret;
            return Long.compare(y, o.y);
        }

    }
}

