import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long d = sc.nextLong();
        long x = 0;
        long y = 0;

        long count = 0;

        for(long i = 0; i < n; i++){
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        }
        sc.close();

        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long d = sc.nextLong();
        long x = 0;
        long y = 0;

        long count = 0;

        for(long i = 0; i < n; i++){
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        }
        sc.close();

        System.out.println(count);
    }
} Main public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long d = sc.nextLong();
        long x = 0;
        long y = 0;

        long count = 0;

        for(long i = 0; i < n; i++){
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        }
        sc.close();

        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long d = sc.nextLong();
        long x = 0;
        long y = 0;

        long count = 0;

        for(long i = 0; i < n; i++){
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        }
        sc.close();

        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long n = sc.nextLong(); n sc.nextLong() sc.nextLong sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc long x = 0; x 0 long y = 0; y 0 long count = 0; count 0 for(long i = 0; i < n; i++){
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        } long i = 0; long i = 0; i 0 i < n i n i++ i++ i {
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        } {
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        } x = sc.nextLong() x sc.nextLong() sc.nextLong sc y = sc.nextLong() y sc.nextLong() sc.nextLong sc if((x * x) + (y * y) <= d * d){
                count++;
            } (x * x) + (y * y) <= d * d (x * x) + (y * y) (x * x) x x (y * y) y y d * d d d {
                count++;
            } count++ count sc.close() sc.close sc System.out.println(count) System.out.println System.out System System.out count String args[] args
import java.util.Scanner;

class Main{
    public static void main(String args[]){
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        long d = sc.nextLong();
        long x = 0;
        long y = 0;

        long count = 0;

        for(long i = 0; i < n; i++){
            x = sc.nextLong();
            y = sc.nextLong();
            if((x * x) + (y * y) <= d * d){
                count++;
            }
        }
        sc.close();

        System.out.println(count);
    }
}