import java.util.*;
public class Main {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(); long d = in.nextLong();
      int count = 0;
      while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      }
      System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(); long d = in.nextLong();
      int count = 0;
      while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      }
      System.out.println(count);
    }
} Main public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(); long d = in.nextLong();
      int count = 0;
      while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      }
      System.out.println(count);
    } main {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(); long d = in.nextLong();
      int count = 0;
      while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      }
      System.out.println(count);
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in long d = in.nextLong(); d in.nextLong() in.nextLong in int count = 0; count 0 while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      } n > 0 n 0 {
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      } n-- n long x = in.nextLong(); x in.nextLong() in.nextLong in long y = in.nextLong(); y in.nextLong() in.nextLong in if(x*x + y*y <= d*d) count++; x*x + y*y <= d*d x*x + y*y x*x x x y*y y y d*d d d count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args public class Main {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(); long d = in.nextLong();
      int count = 0;
      while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      }
      System.out.println(count);
    }
} public class Main {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(); long d = in.nextLong();
      int count = 0;
      while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      }
      System.out.println(count);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String args[]) {
      Scanner in = new Scanner(System.in);
      int n = in.nextInt(); long d = in.nextLong();
      int count = 0;
      while(n > 0){
          n--;
          long x = in.nextLong();
          long y = in.nextLong();
          if(x*x + y*y <= d*d) count++;
      }
      System.out.println(count);
    }
}