import java.util.*;
import java.io.*;
import java.math.*;
class Main
{
    public static void main(String[] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int D = sc.nextInt();
        int cnt=0;
        for(int i=0;i<N;i++)
        {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        }
        System.out.println(cnt);
    }
} import java.util.*; util.* java import java.io.*; io.* java import java.math.*; math.* java class Main
{
    public static void main(String[] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int D = sc.nextInt();
        int cnt=0;
        for(int i=0;i<N;i++)
        {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        }
        System.out.println(cnt);
    }
} Main public static void main(String[] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int D = sc.nextInt();
        int cnt=0;
        for(int i=0;i<N;i++)
        {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int D = sc.nextInt();
        int cnt=0;
        for(int i=0;i<N;i++)
        {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int D = sc.nextInt(); D sc.nextInt() sc.nextInt sc int cnt=0; cnt 0 for(int i=0;i<N;i++)
        {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        } {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        } double a = sc.nextInt(); a sc.nextInt() sc.nextInt sc double b = sc.nextInt(); b sc.nextInt() sc.nextInt sc a = Math.pow(a,2) a Math.pow(a,2) Math.pow Math a 2 b = Math.pow(b,2) b Math.pow(b,2) Math.pow Math b 2 double temp = a+b; temp a+b a b double ans = Math.sqrt(temp); ans Math.sqrt(temp) Math.sqrt Math temp if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            } ans <= D ans D {
                cnt++;
                //System.out.println(cnt);
            } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args
import java.util.*;
import java.io.*;
import java.math.*;
class Main
{
    public static void main(String[] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int D = sc.nextInt();
        int cnt=0;
        for(int i=0;i<N;i++)
        {
            double a = sc.nextInt();
            double b = sc.nextInt();
            a = Math.pow(a,2);
            b = Math.pow(b,2);
            double temp = a+b;
            double ans = Math.sqrt(temp);
            //System.out.println("\n\t i="+i+" ans="+ans);
            if(ans <= D)
            {
                cnt++;
                //System.out.println(cnt);
            }
            
        }
        System.out.println(cnt);
    }
}