import javax.sound.midi.Soundbank;
import java.util.*;
import java.lang.*;

public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int d = s.nextInt();
        int c = 0;
        for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        }
        System.out.println(c);

    }
} import javax.sound.midi.Soundbank; Soundbank javax.sound.midi import java.util.*; util.* java import java.lang.*; lang.* java public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int d = s.nextInt();
        int c = 0;
        for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        }
        System.out.println(c);

    }
} Main public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int d = s.nextInt();
        int c = 0;
        for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        }
        System.out.println(c);

    } main {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int d = s.nextInt();
        int c = 0;
        for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        }
        System.out.println(c);

    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int n = s.nextInt(); n s.nextInt() s.nextInt s int d = s.nextInt(); d s.nextInt() s.nextInt s int c = 0; c 0 for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        } {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        } int x = s.nextInt(); x s.nextInt() s.nextInt s int y = s.nextInt(); y s.nextInt() s.nextInt s double distsq = Math.pow(x,2)+Math.pow(y,2); distsq Math.pow(x,2)+Math.pow(y,2) Math.pow(x,2) Math.pow Math x 2 Math.pow(y,2) Math.pow Math y 2 if(distsq<=Math.pow(d,2))
                c++; distsq<=Math.pow(d,2) distsq Math.pow(d,2) Math.pow Math d 2 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)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int d = s.nextInt();
        int c = 0;
        for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        }
        System.out.println(c);

    }
} public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int d = s.nextInt();
        int c = 0;
        for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        }
        System.out.println(c);

    }
} Main
import javax.sound.midi.Soundbank;
import java.util.*;
import java.lang.*;

public class Main
{
    public static void main (String[] args)
    {
        // your code goes here
        Scanner s = new Scanner(System.in);
        int n = s.nextInt();
        int d = s.nextInt();
        int c = 0;
        for(int i=0; i<n; i++)
        {
            int x = s.nextInt();
            int y = s.nextInt();
            double distsq = Math.pow(x,2)+Math.pow(y,2);
            if(distsq<=Math.pow(d,2))
                c++;
        }
        System.out.println(c);

    }
}
