import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long N=sc.nextLong(), D=sc.nextLong(), t=0, a,b,d;
    D*=D;
    for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    }
    System.out.println(t);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long N=sc.nextLong(), D=sc.nextLong(), t=0, a,b,d;
    D*=D;
    for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    }
    System.out.println(t);
  }
} Main public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long N=sc.nextLong(), D=sc.nextLong(), t=0, a,b,d;
    D*=D;
    for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    }
    System.out.println(t);
  } main {
    Scanner sc=new Scanner(System.in);
    long N=sc.nextLong(), D=sc.nextLong(), t=0, a,b,d;
    D*=D;
    for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    }
    System.out.println(t);
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) long N=sc.nextLong() N sc.nextLong() sc.nextLong sc D=sc.nextLong() D sc.nextLong() sc.nextLong sc t=0 t 0 a a b b d; d D*=D D D for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    } {
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    } a=sc.nextLong() a sc.nextLong() sc.nextLong sc b=sc.nextLong() b sc.nextLong() sc.nextLong sc d = a*a +b*b d a*a +b*b a*a a a b*b b b if(d<=D) t++; d<=D d D t++ t System.out.println(t) System.out.println System.out System System.out t String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long N=sc.nextLong(), D=sc.nextLong(), t=0, a,b,d;
    D*=D;
    for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    }
    System.out.println(t);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long N=sc.nextLong(), D=sc.nextLong(), t=0, a,b,d;
    D*=D;
    for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    }
    System.out.println(t);
  }
} Main
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    long N=sc.nextLong(), D=sc.nextLong(), t=0, a,b,d;
    D*=D;
    for(int i=0; i<N; i++){
      a=sc.nextLong();
      b=sc.nextLong();
      d = a*a +b*b;
      if(d<=D) t++;
    }
    System.out.println(t);
  }
}