import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
 
      int N = sc.nextInt();
      long D = sc.nextInt();
      int C = 0;
      long DD = D*D;
      for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      }
      
	System.out.println(C);
      
    }
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
 
      int N = sc.nextInt();
      long D = sc.nextInt();
      int C = 0;
      long DD = D*D;
      for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      }
      
	System.out.println(C);
      
    }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
 
      int N = sc.nextInt();
      long D = sc.nextInt();
      int C = 0;
      long DD = D*D;
      for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      }
      
	System.out.println(C);
      
    } main {
      Scanner sc = new Scanner(System.in);
 
      int N = sc.nextInt();
      long D = sc.nextInt();
      int C = 0;
      long DD = D*D;
      for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      }
      
	System.out.println(C);
      
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long D = sc.nextInt(); D sc.nextInt() sc.nextInt sc int C = 0; C 0 long DD = D*D; DD D*D D D for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      } {
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      } long X = sc.nextInt(); X sc.nextInt() sc.nextInt sc long XX = X*X; XX X*X X X long Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc long YY = Y*Y; YY Y*Y Y Y if((XX+YY)<=(DD)){
        	C++;
        } (XX+YY)<=(DD) (XX+YY) XX YY (DD) {
        	C++;
        } C++ C System.out.println(C) System.out.println System.out System System.out C String[] args args public class Main {
	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
 
      int N = sc.nextInt();
      long D = sc.nextInt();
      int C = 0;
      long DD = D*D;
      for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      }
      
	System.out.println(C);
      
    }
} public class Main {
	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
 
      int N = sc.nextInt();
      long D = sc.nextInt();
      int C = 0;
      long DD = D*D;
      for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      }
      
	System.out.println(C);
      
    }
} Main
import java.util.Scanner;
 
public class Main {
	public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
 
      int N = sc.nextInt();
      long D = sc.nextInt();
      int C = 0;
      long DD = D*D;
      for(int i=0;i<N;i++){
      	long X = sc.nextInt();
        long XX = X*X;
        long Y = sc.nextInt();
        long YY = Y*Y;
        
        if((XX+YY)<=(DD)){
        	C++;
        }
      }
      
	System.out.println(C);
      
    }
}