import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextInt();
        long D = sc.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        }
        System.out.println(count);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextInt();
        long D = sc.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        }
        System.out.println(count);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextInt();
        long D = sc.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        }
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextInt();
        long D = sc.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        }
        System.out.println(count);
    } 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 int count = 0; count 0 for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        } {
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        } long X = sc.nextInt(); X sc.nextInt() sc.nextInt sc long Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc if(X*X+Y*Y > D*D){
                continue;
            } X*X+Y*Y > D*D X*X+Y*Y X*X X X Y*Y Y Y D*D D D {
                continue;
            } continue; 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);
        long N = sc.nextInt();
        long D = sc.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        }
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextInt();
        long D = sc.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        }
        System.out.println(count);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        long N = sc.nextInt();
        long D = sc.nextInt();
        int count = 0;
        for(int i = 0; i < N; i++){
            long X = sc.nextInt();
            long Y = sc.nextInt();
            if(X*X+Y*Y > D*D){
                continue;
            }
            count++;
        }
        System.out.println(count);
    }
}
