
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextInt();
		d = d*d;
		int count =0;
		for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		}
		System.out.println(count);
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextInt();
		d = d*d;
		int count =0;
		for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		}
		System.out.println(count);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextInt();
		d = d*d;
		int count =0;
		for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextInt();
		d = d*d;
		int count =0;
		for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		}
		System.out.println(count);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long d = sc.nextInt(); d sc.nextInt() sc.nextInt sc d = d*d d d*d d d int count =0; count 0 for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		} {
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		} long x = sc.nextInt(); x sc.nextInt() sc.nextInt sc long y = sc.nextInt(); y sc.nextInt() sc.nextInt sc x=x*x x x*x x x y=y*y y y*y y y if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			} x>d || y>d x>d x d y>d y d continue; if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			} (x==d && y==0) || (y==d && x==0) (x==d && y==0) x==d x d y==0 y 0 (y==d && x==0) y==d y d x==0 x 0 count++ count {
				if(x+y<=d)
					count++;
			} if(x+y<=d)
					count++; x+y<=d x+y x y d 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) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextInt();
		d = d*d;
		int count =0;
		for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		}
		System.out.println(count);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextInt();
		d = d*d;
		int count =0;
		for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		}
		System.out.println(count);
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextInt();
		d = d*d;
		int count =0;
		for(int i=0;i<n;i++)
		{
			long x = sc.nextInt();
			long y = sc.nextInt();
			
			x=x*x;
			y=y*y;
			
			if(x>d || y>d)
				continue;
			else if( (x==d && y==0) || (y==d && x==0))
				count++;
			else
			{
				if(x+y<=d)
					count++;
			}
		}
		System.out.println(count);
	}

}
