import java.util.*;

class Main{

  public static void main(String args[]){

    Scanner s=new Scanner(System.in);
    int N=s.nextInt();
    long D=s.nextLong();
    D=D*D;
    int ans=0;
    long[][] point=new long[N][2];
    for(int i=0;i<N;i++){
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    }
    
    
    System.out.println(ans);
  }  
} import java.util.*; util.* java class Main{

  public static void main(String args[]){

    Scanner s=new Scanner(System.in);
    int N=s.nextInt();
    long D=s.nextLong();
    D=D*D;
    int ans=0;
    long[][] point=new long[N][2];
    for(int i=0;i<N;i++){
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    }
    
    
    System.out.println(ans);
  }  
} Main public static void main(String args[]){

    Scanner s=new Scanner(System.in);
    int N=s.nextInt();
    long D=s.nextLong();
    D=D*D;
    int ans=0;
    long[][] point=new long[N][2];
    for(int i=0;i<N;i++){
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    }
    
    
    System.out.println(ans);
  } main {

    Scanner s=new Scanner(System.in);
    int N=s.nextInt();
    long D=s.nextLong();
    D=D*D;
    int ans=0;
    long[][] point=new long[N][2];
    for(int i=0;i<N;i++){
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    }
    
    
    System.out.println(ans);
  } Scanner s=new Scanner(System.in); s new Scanner(System.in) int N=s.nextInt(); N s.nextInt() s.nextInt s long D=s.nextLong(); D s.nextLong() s.nextLong s D=D*D D D*D D D int ans=0; ans 0 long[][] point=new long[N][2]; point new long[N][2] N 2 for(int i=0;i<N;i++){
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    } {
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    } for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      } int j=0; int j=0; j 0 j<2 j 2 j++ j++ j {
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      } {
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      } point[i][j]=s.nextLong() point[i][j] point[i] point i j s.nextLong() s.nextLong s point[i][j]=point[i][j]*point[i][j] point[i][j] point[i] point i j point[i][j]*point[i][j] point[i][j] point[i] point i j point[i][j] point[i] point i j if (point[i][0]+point[i][1]<=D){ans+=1;} point[i][0]+point[i][1]<=D point[i][0]+point[i][1] point[i][0] point[i] point i 0 point[i][1] point[i] point i 1 D {ans+=1;} ans+=1 ans 1 System.out.println(ans) System.out.println System.out System System.out ans String args[] args
import java.util.*;

class Main{

  public static void main(String args[]){

    Scanner s=new Scanner(System.in);
    int N=s.nextInt();
    long D=s.nextLong();
    D=D*D;
    int ans=0;
    long[][] point=new long[N][2];
    for(int i=0;i<N;i++){
      for(int j=0;j<2;j++){
        point[i][j]=s.nextLong();
        point[i][j]=point[i][j]*point[i][j];
      }
      if (point[i][0]+point[i][1]<=D){ans+=1;}
    }
    
    
    System.out.println(ans);
  }  
}