import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long d = sc.nextInt();
        long[] x = new long[n];
        long[] y = new long[n];
        for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        }
        sc.close();
        int count = 0;
        for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        }
        System.out.println(count);
    }

}  import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long d = sc.nextInt();
        long[] x = new long[n];
        long[] y = new long[n];
        for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        }
        sc.close();
        int count = 0;
        for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        }
        System.out.println(count);
    }

} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long d = sc.nextInt();
        long[] x = new long[n];
        long[] y = new long[n];
        for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        }
        sc.close();
        int count = 0;
        for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long d = sc.nextInt();
        long[] x = new long[n];
        long[] y = new long[n];
        for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        }
        sc.close();
        int count = 0;
        for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        }
        System.out.println(count);
    } 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 long[] x = new long[n]; x new long[n] n long[] y = new long[n]; y new long[n] n for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        } {
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc y[i] = sc.nextInt() y[i] y i sc.nextInt() sc.nextInt sc sc.close() sc.close sc int count = 0; count 0 for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        } {
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        } if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            } x[i] * x[i] + y[i] * y[i] <= d * d x[i] * x[i] + y[i] * y[i] x[i] * x[i] x[i] x i x[i] x i y[i] * y[i] y[i] y i y[i] y i d * d d d {
                count++;
            } 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) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long d = sc.nextInt();
        long[] x = new long[n];
        long[] y = new long[n];
        for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        }
        sc.close();
        int count = 0;
        for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        }
        System.out.println(count);
    }

} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long d = sc.nextInt();
        long[] x = new long[n];
        long[] y = new long[n];
        for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        }
        sc.close();
        int count = 0;
        for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        }
        System.out.println(count);
    }

} Main
import java.util.Scanner;
import java.util.ArrayList;
import java.util.List;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        long d = sc.nextInt();
        long[] x = new long[n];
        long[] y = new long[n];
        for(int i = 0; i < n; i++){
           x[i] = sc.nextInt();
           y[i] = sc.nextInt();
        }
        sc.close();
        int count = 0;
        for(int i = 0; i < n; i++){
            if(x[i] * x[i] + y[i] * y[i] <= d * d){
                count++;
            }
        }
        System.out.println(count);
    }

} 
