import java.util.Scanner;

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

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