import java.util.*;
import java.io.*;
import java.util.stream.Collectors;

public class Main {
  public static void main(String[] args) throws IOException {
    sc = new MScanner(System.in);
    pw = new PrintWriter(System.out);
    int N = sc.nextInt();
    long D = sc.nextLong();
    long DD = D * D;
    int cnt = 0;
    long x, y;
    for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    }

    pw.println(cnt);

    pw.flush();
    // System.out.println(cnt);
  }

  // sc.close();
  // pw.println(cnt);
  // pw.flush();
  public static int cal(int flipped) {
    int cnt = 0;
    while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    }
    return cnt;
  }

  public static int numPop(int num) {
    int cnt = 0;
    while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    }
    return cnt;
  }

  static PrintWriter pw;
  static MScanner sc;

  static class MScanner {
    StringTokenizer st;
    BufferedReader br;

    public MScanner(InputStream system) {
      br = new BufferedReader(new InputStreamReader(system));
    }

    public MScanner(String file) throws Exception {
      br = new BufferedReader(new FileReader(file));
    }

    public String next() throws IOException {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return st.nextToken();
    }

    public int[] intArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public long[] longArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public int[] intSortedArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public long[] longSortedArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public Integer[] IntegerArr(int n) throws IOException {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public Long[] LongArr(int n) throws IOException {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public String nextLine() throws IOException {
      return br.readLine();
    }

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public char nextChar() throws IOException {
      return next().charAt(0);
    }

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

    public boolean ready() throws IOException {
      return br.ready();
    }

    public void waitForInput() throws InterruptedException {
      Thread.sleep(3000);
    }
  }

  static void shuffle(int[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }

  static void shuffle(long[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }
} import java.util.*; util.* java import java.io.*; io.* java import java.util.stream.Collectors; Collectors java.util.stream public class Main {
  public static void main(String[] args) throws IOException {
    sc = new MScanner(System.in);
    pw = new PrintWriter(System.out);
    int N = sc.nextInt();
    long D = sc.nextLong();
    long DD = D * D;
    int cnt = 0;
    long x, y;
    for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    }

    pw.println(cnt);

    pw.flush();
    // System.out.println(cnt);
  }

  // sc.close();
  // pw.println(cnt);
  // pw.flush();
  public static int cal(int flipped) {
    int cnt = 0;
    while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    }
    return cnt;
  }

  public static int numPop(int num) {
    int cnt = 0;
    while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    }
    return cnt;
  }

  static PrintWriter pw;
  static MScanner sc;

  static class MScanner {
    StringTokenizer st;
    BufferedReader br;

    public MScanner(InputStream system) {
      br = new BufferedReader(new InputStreamReader(system));
    }

    public MScanner(String file) throws Exception {
      br = new BufferedReader(new FileReader(file));
    }

    public String next() throws IOException {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return st.nextToken();
    }

    public int[] intArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public long[] longArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public int[] intSortedArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public long[] longSortedArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public Integer[] IntegerArr(int n) throws IOException {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public Long[] LongArr(int n) throws IOException {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public String nextLine() throws IOException {
      return br.readLine();
    }

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public char nextChar() throws IOException {
      return next().charAt(0);
    }

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

    public boolean ready() throws IOException {
      return br.ready();
    }

    public void waitForInput() throws InterruptedException {
      Thread.sleep(3000);
    }
  }

  static void shuffle(int[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }

  static void shuffle(long[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }
} Main static PrintWriter pw; pw static MScanner sc; sc public static void main(String[] args) throws IOException {
    sc = new MScanner(System.in);
    pw = new PrintWriter(System.out);
    int N = sc.nextInt();
    long D = sc.nextLong();
    long DD = D * D;
    int cnt = 0;
    long x, y;
    for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    }

    pw.println(cnt);

    pw.flush();
    // System.out.println(cnt);
  } main {
    sc = new MScanner(System.in);
    pw = new PrintWriter(System.out);
    int N = sc.nextInt();
    long D = sc.nextLong();
    long DD = D * D;
    int cnt = 0;
    long x, y;
    for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    }

    pw.println(cnt);

    pw.flush();
    // System.out.println(cnt);
  } sc = new MScanner(System.in) sc new MScanner(System.in) pw = new PrintWriter(System.out) pw new PrintWriter(System.out) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long D = sc.nextLong(); D sc.nextLong() sc.nextLong sc long DD = D * D; DD D * D D D int cnt = 0; cnt 0 long x x y; y for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    } {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    } x = sc.nextLong() x sc.nextLong() sc.nextLong sc y = sc.nextLong() y sc.nextLong() sc.nextLong sc if (Math.abs(x) > D) {
        continue;
      } Math.abs(x) > D Math.abs(x) Math.abs Math x D {
        continue;
      } continue; if (Math.abs(y) > D) {
        continue;
      } Math.abs(y) > D Math.abs(y) Math.abs Math y D {
        continue;
      } continue; if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      } (x * x) + (y * y) <= (DD) (x * x) + (y * y) (x * x) x x (y * y) y y (DD) {
        cnt++;
      } cnt++ cnt pw.println(cnt) pw.println pw cnt pw.flush() pw.flush pw String[] args args // sc.close();
  // pw.println(cnt);
  // pw.flush();
  public static int cal(int flipped) {
    int cnt = 0;
    while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    }
    return cnt;
  } cal {
    int cnt = 0;
    while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    }
    return cnt;
  } int cnt = 0; cnt 0 while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    } flipped != 0 flipped 0 {
      flipped = flipped % numPop(flipped);
      cnt++;
    } flipped = flipped % numPop(flipped) flipped flipped % numPop(flipped) flipped numPop(flipped) numPop flipped cnt++ cnt return cnt; cnt int flipped flipped public static int numPop(int num) {
    int cnt = 0;
    while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    }
    return cnt;
  } numPop {
    int cnt = 0;
    while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    }
    return cnt;
  } int cnt = 0; cnt 0 while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    } num != 0 num 0 {
      cnt += (num & 1);
      num = num >> 1;
    } cnt += (num & 1) cnt (num & 1) num 1 num = num >> 1 num num >> 1 num 1 return cnt; cnt int num num static void shuffle(int[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  } shuffle {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  } for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    } int i = 0; int i = 0; i 0 i < in.length i in.length in in.length i++ i++ i {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    } {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    } int idx = (int) (Math.random() * in.length); idx (int) (Math.random() * in.length) Math.random() Math.random Math in.length in in.length int tmp = in[i]; tmp in[i] in i in[i] = in[idx] in[i] in i in[idx] in idx in[idx] = tmp in[idx] in idx tmp int[] in in static void shuffle(long[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  } shuffle {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  } for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    } int i = 0; int i = 0; i 0 i < in.length i in.length in in.length i++ i++ i {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    } {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    } int idx = (int) (Math.random() * in.length); idx (int) (Math.random() * in.length) Math.random() Math.random Math in.length in in.length long tmp = in[i]; tmp in[i] in i in[i] = in[idx] in[i] in i in[idx] in idx in[idx] = tmp in[idx] in idx tmp long[] in in static class MScanner {
    StringTokenizer st;
    BufferedReader br;

    public MScanner(InputStream system) {
      br = new BufferedReader(new InputStreamReader(system));
    }

    public MScanner(String file) throws Exception {
      br = new BufferedReader(new FileReader(file));
    }

    public String next() throws IOException {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return st.nextToken();
    }

    public int[] intArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public long[] longArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public int[] intSortedArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public long[] longSortedArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public Integer[] IntegerArr(int n) throws IOException {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public Long[] LongArr(int n) throws IOException {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public String nextLine() throws IOException {
      return br.readLine();
    }

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public char nextChar() throws IOException {
      return next().charAt(0);
    }

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

    public boolean ready() throws IOException {
      return br.ready();
    }

    public void waitForInput() throws InterruptedException {
      Thread.sleep(3000);
    }
  } MScanner StringTokenizer st; st BufferedReader br; br public MScanner(InputStream system) {
      br = new BufferedReader(new InputStreamReader(system));
    } MScanner {
      br = new BufferedReader(new InputStreamReader(system));
    } br = new BufferedReader(new InputStreamReader(system)) br new BufferedReader(new InputStreamReader(system)) InputStream system system public MScanner(String file) throws Exception {
      br = new BufferedReader(new FileReader(file));
    } MScanner {
      br = new BufferedReader(new FileReader(file));
    } br = new BufferedReader(new FileReader(file)) br new BufferedReader(new FileReader(file)) String file file public String next() throws IOException {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return st.nextToken();
    } next {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return 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 st.nextToken(); st.nextToken() st.nextToken st public int[] intArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    } intArr {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    } int[] in = new int[n]; in new int[n] n for (int i = 0; i < n; i++) in[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i in[i] = nextInt(); in[i] = nextInt() in[i] in i nextInt() nextInt return in; in int n n public long[] longArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    } longArr {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    } long[] in = new long[n]; in new long[n] n for (int i = 0; i < n; i++) in[i] = nextLong(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i in[i] = nextLong(); in[i] = nextLong() in[i] in i nextLong() nextLong return in; in int n n public int[] intSortedArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    } intSortedArr {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    } int[] in = new int[n]; in new int[n] n for (int i = 0; i < n; i++) in[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i in[i] = nextInt(); in[i] = nextInt() in[i] in i nextInt() nextInt shuffle(in) shuffle in Arrays.sort(in) Arrays.sort Arrays in return in; in int n n public long[] longSortedArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    } longSortedArr {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    } long[] in = new long[n]; in new long[n] n for (int i = 0; i < n; i++) in[i] = nextLong(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i in[i] = nextLong(); in[i] = nextLong() in[i] in i nextLong() nextLong shuffle(in) shuffle in Arrays.sort(in) Arrays.sort Arrays in return in; in int n n public Integer[] IntegerArr(int n) throws IOException {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    } IntegerArr {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    } Integer[] in = new Integer[n]; in new Integer[n] n for (int i = 0; i < n; i++) in[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i in[i] = nextInt(); in[i] = nextInt() in[i] in i nextInt() nextInt return in; in int n n public Long[] LongArr(int n) throws IOException {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    } LongArr {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    } Long[] in = new Long[n]; in new Long[n] n for (int i = 0; i < n; i++) in[i] = nextLong(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i in[i] = nextLong(); in[i] = nextLong() in[i] in i nextLong() nextLong return in; in int n n public String nextLine() throws IOException {
      return br.readLine();
    } nextLine {
      return br.readLine();
    } return br.readLine(); br.readLine() br.readLine br public int nextInt() throws IOException {
      return Integer.parseInt(next());
    } nextInt {
      return Integer.parseInt(next());
    } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    } nextDouble {
      return Double.parseDouble(next());
    } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next public char nextChar() throws IOException {
      return next().charAt(0);
    } nextChar {
      return next().charAt(0);
    } return next().charAt(0); next().charAt(0) next().charAt next() next 0 public long nextLong() throws IOException {
      return Long.parseLong(next());
    } nextLong {
      return Long.parseLong(next());
    } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public boolean ready() throws IOException {
      return br.ready();
    } ready {
      return br.ready();
    } return br.ready(); br.ready() br.ready br public void waitForInput() throws InterruptedException {
      Thread.sleep(3000);
    } waitForInput {
      Thread.sleep(3000);
    } Thread.sleep(3000) Thread.sleep Thread 3000 public class Main {
  public static void main(String[] args) throws IOException {
    sc = new MScanner(System.in);
    pw = new PrintWriter(System.out);
    int N = sc.nextInt();
    long D = sc.nextLong();
    long DD = D * D;
    int cnt = 0;
    long x, y;
    for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    }

    pw.println(cnt);

    pw.flush();
    // System.out.println(cnt);
  }

  // sc.close();
  // pw.println(cnt);
  // pw.flush();
  public static int cal(int flipped) {
    int cnt = 0;
    while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    }
    return cnt;
  }

  public static int numPop(int num) {
    int cnt = 0;
    while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    }
    return cnt;
  }

  static PrintWriter pw;
  static MScanner sc;

  static class MScanner {
    StringTokenizer st;
    BufferedReader br;

    public MScanner(InputStream system) {
      br = new BufferedReader(new InputStreamReader(system));
    }

    public MScanner(String file) throws Exception {
      br = new BufferedReader(new FileReader(file));
    }

    public String next() throws IOException {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return st.nextToken();
    }

    public int[] intArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public long[] longArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public int[] intSortedArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public long[] longSortedArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public Integer[] IntegerArr(int n) throws IOException {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public Long[] LongArr(int n) throws IOException {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public String nextLine() throws IOException {
      return br.readLine();
    }

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public char nextChar() throws IOException {
      return next().charAt(0);
    }

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

    public boolean ready() throws IOException {
      return br.ready();
    }

    public void waitForInput() throws InterruptedException {
      Thread.sleep(3000);
    }
  }

  static void shuffle(int[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }

  static void shuffle(long[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    sc = new MScanner(System.in);
    pw = new PrintWriter(System.out);
    int N = sc.nextInt();
    long D = sc.nextLong();
    long DD = D * D;
    int cnt = 0;
    long x, y;
    for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    }

    pw.println(cnt);

    pw.flush();
    // System.out.println(cnt);
  }

  // sc.close();
  // pw.println(cnt);
  // pw.flush();
  public static int cal(int flipped) {
    int cnt = 0;
    while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    }
    return cnt;
  }

  public static int numPop(int num) {
    int cnt = 0;
    while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    }
    return cnt;
  }

  static PrintWriter pw;
  static MScanner sc;

  static class MScanner {
    StringTokenizer st;
    BufferedReader br;

    public MScanner(InputStream system) {
      br = new BufferedReader(new InputStreamReader(system));
    }

    public MScanner(String file) throws Exception {
      br = new BufferedReader(new FileReader(file));
    }

    public String next() throws IOException {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return st.nextToken();
    }

    public int[] intArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public long[] longArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public int[] intSortedArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public long[] longSortedArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public Integer[] IntegerArr(int n) throws IOException {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public Long[] LongArr(int n) throws IOException {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public String nextLine() throws IOException {
      return br.readLine();
    }

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public char nextChar() throws IOException {
      return next().charAt(0);
    }

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

    public boolean ready() throws IOException {
      return br.ready();
    }

    public void waitForInput() throws InterruptedException {
      Thread.sleep(3000);
    }
  }

  static void shuffle(int[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }

  static void shuffle(long[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }
} Main
import java.util.*;
import java.io.*;
import java.util.stream.Collectors;

public class Main {
  public static void main(String[] args) throws IOException {
    sc = new MScanner(System.in);
    pw = new PrintWriter(System.out);
    int N = sc.nextInt();
    long D = sc.nextLong();
    long DD = D * D;
    int cnt = 0;
    long x, y;
    for (int i = 0; i < N; i++) {
      x = sc.nextLong();
      y = sc.nextLong();

      if (Math.abs(x) > D) {
        continue;
      }
      if (Math.abs(y) > D) {
        continue;
      }
      if ((x * x) + (y * y) <= (DD)) {
        cnt++;
      }
      //memo.add(Integer.hashCode(k));
    }

    pw.println(cnt);

    pw.flush();
    // System.out.println(cnt);
  }

  // sc.close();
  // pw.println(cnt);
  // pw.flush();
  public static int cal(int flipped) {
    int cnt = 0;
    while (flipped != 0) {
      flipped = flipped % numPop(flipped);
      cnt++;
    }
    return cnt;
  }

  public static int numPop(int num) {
    int cnt = 0;
    while (num != 0) {
      cnt += (num & 1);
      num = num >> 1;
    }
    return cnt;
  }

  static PrintWriter pw;
  static MScanner sc;

  static class MScanner {
    StringTokenizer st;
    BufferedReader br;

    public MScanner(InputStream system) {
      br = new BufferedReader(new InputStreamReader(system));
    }

    public MScanner(String file) throws Exception {
      br = new BufferedReader(new FileReader(file));
    }

    public String next() throws IOException {
      while (st == null || !st.hasMoreTokens()) st = new StringTokenizer(br.readLine());
      return st.nextToken();
    }

    public int[] intArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public long[] longArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public int[] intSortedArr(int n) throws IOException {
      int[] in = new int[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public long[] longSortedArr(int n) throws IOException {
      long[] in = new long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      shuffle(in);
      Arrays.sort(in);
      return in;
    }

    public Integer[] IntegerArr(int n) throws IOException {
      Integer[] in = new Integer[n];
      for (int i = 0; i < n; i++) in[i] = nextInt();
      return in;
    }

    public Long[] LongArr(int n) throws IOException {
      Long[] in = new Long[n];
      for (int i = 0; i < n; i++) in[i] = nextLong();
      return in;
    }

    public String nextLine() throws IOException {
      return br.readLine();
    }

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

    public double nextDouble() throws IOException {
      return Double.parseDouble(next());
    }

    public char nextChar() throws IOException {
      return next().charAt(0);
    }

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

    public boolean ready() throws IOException {
      return br.ready();
    }

    public void waitForInput() throws InterruptedException {
      Thread.sleep(3000);
    }
  }

  static void shuffle(int[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      int tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }

  static void shuffle(long[] in) {
    for (int i = 0; i < in.length; i++) {
      int idx = (int) (Math.random() * in.length);
      long tmp = in[i];
      in[i] = in[idx];
      in[idx] = tmp;
    }
  }
}
