import java.util.Scanner;
import java.time.Year;
import java.util.Random;
import java.math.*;

public class Main{
    public static void main(String[] args){
        Scanner sc =new Scanner(System.in);
        long n = sc.nextInt();
        long d = sc.nextInt();
        long x = 0;
        long y = 0;
        long d2=d*d;
        long a = 0;
        int bigger = 0;
        int smaller = 0;
        while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        }
    }
}
      import java.util.Scanner; Scanner java.util import java.time.Year; Year java.time import java.util.Random; Random java.util import java.math.*; math.* java public class Main{
    public static void main(String[] args){
        Scanner sc =new Scanner(System.in);
        long n = sc.nextInt();
        long d = sc.nextInt();
        long x = 0;
        long y = 0;
        long d2=d*d;
        long a = 0;
        int bigger = 0;
        int smaller = 0;
        while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        }
    }
} Main public static void main(String[] args){
        Scanner sc =new Scanner(System.in);
        long n = sc.nextInt();
        long d = sc.nextInt();
        long x = 0;
        long y = 0;
        long d2=d*d;
        long a = 0;
        int bigger = 0;
        int smaller = 0;
        while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        }
    } main {
        Scanner sc =new Scanner(System.in);
        long n = sc.nextInt();
        long d = sc.nextInt();
        long x = 0;
        long y = 0;
        long d2=d*d;
        long a = 0;
        int bigger = 0;
        int smaller = 0;
        while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        }
    } Scanner sc =new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long x = 0; x 0 long y = 0; y 0 long d2=d*d; d2 d*d d d long a = 0; a 0 int bigger = 0; bigger 0 int smaller = 0; smaller 0 while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        } true {
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        } x = sc.nextInt() x sc.nextInt() sc.nextInt sc y = sc.nextInt() y sc.nextInt() sc.nextInt sc a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)) a (Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)) Math.abs(x)*Math.abs(x) Math.abs(x) Math.abs Math x Math.abs(x) Math.abs Math x Math.abs(y)*Math.abs(y) Math.abs(y) Math.abs Math y Math.abs(y) Math.abs Math y if(a > d2){
                bigger++;
            }else{
                smaller++;
            } a > d2 a d2 {
                bigger++;
            } bigger++ bigger {
                smaller++;
            } smaller++ smaller if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            } bigger+smaller >= n bigger+smaller bigger smaller n {
                System.out.println(smaller);
                break;
            } System.out.println(smaller) System.out.println System.out System System.out smaller break; String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc =new Scanner(System.in);
        long n = sc.nextInt();
        long d = sc.nextInt();
        long x = 0;
        long y = 0;
        long d2=d*d;
        long a = 0;
        int bigger = 0;
        int smaller = 0;
        while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        }
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc =new Scanner(System.in);
        long n = sc.nextInt();
        long d = sc.nextInt();
        long x = 0;
        long y = 0;
        long d2=d*d;
        long a = 0;
        int bigger = 0;
        int smaller = 0;
        while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        }
    }
} Main
import java.util.Scanner;
import java.time.Year;
import java.util.Random;
import java.math.*;

public class Main{
    public static void main(String[] args){
        Scanner sc =new Scanner(System.in);
        long n = sc.nextInt();
        long d = sc.nextInt();
        long x = 0;
        long y = 0;
        long d2=d*d;
        long a = 0;
        int bigger = 0;
        int smaller = 0;
        while(true){
            x = sc.nextInt();
            y = sc.nextInt();
            a=(Math.abs(x)*Math.abs(x) + Math.abs(y)*Math.abs(y)); 
            if(a > d2){
                bigger++;
            }else{
                smaller++;
            }
            if(bigger+smaller >= n){
                System.out.println(smaller);
                break;
            }
        }
    }
}
     