import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
		int count = 0;
		
		while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		}
		System.out.println(count);
	}

	private static boolean calculate(long x,long y, int d) {
		x = x*x;
		y = y*y;
		x += y;
		double sqrt = Math.sqrt(x);
		if(sqrt > d)
			return false;
		return true;
		
	}

} 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();
		int d = sc.nextInt();
		int count = 0;
		
		while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		}
		System.out.println(count);
	}

	private static boolean calculate(long x,long y, int d) {
		x = x*x;
		y = y*y;
		x += y;
		double sqrt = Math.sqrt(x);
		if(sqrt > d)
			return false;
		return true;
		
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
		int count = 0;
		
		while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
		int count = 0;
		
		while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),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 int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc int count = 0; count 0 while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		} n-- > 0 n-- n 0 {
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		} if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++; calculate(sc.nextLong(),sc.nextLong(),d) calculate sc.nextLong() sc.nextLong sc sc.nextLong() sc.nextLong sc d count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private static boolean calculate(long x,long y, int d) {
		x = x*x;
		y = y*y;
		x += y;
		double sqrt = Math.sqrt(x);
		if(sqrt > d)
			return false;
		return true;
		
	} calculate {
		x = x*x;
		y = y*y;
		x += y;
		double sqrt = Math.sqrt(x);
		if(sqrt > d)
			return false;
		return true;
		
	} x = x*x x x*x x x y = y*y y y*y y y x += y x y double sqrt = Math.sqrt(x); sqrt Math.sqrt(x) Math.sqrt Math x if(sqrt > d)
			return false; sqrt > d sqrt d return false; false return true; true long x x long y y int d d public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
		int count = 0;
		
		while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		}
		System.out.println(count);
	}

	private static boolean calculate(long x,long y, int d) {
		x = x*x;
		y = y*y;
		x += y;
		double sqrt = Math.sqrt(x);
		if(sqrt > d)
			return false;
		return true;
		
	}

} public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
		int count = 0;
		
		while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		}
		System.out.println(count);
	}

	private static boolean calculate(long x,long y, int d) {
		x = x*x;
		y = y*y;
		x += y;
		double sqrt = Math.sqrt(x);
		if(sqrt > d)
			return false;
		return true;
		
	}

} Main
import java.util.Scanner;

public class Main{

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int d = sc.nextInt();
		int count = 0;
		
		while(n-- > 0)
		{
			if(calculate(sc.nextLong(),sc.nextLong(),d))
				count++;
		}
		System.out.println(count);
	}

	private static boolean calculate(long x,long y, int d) {
		x = x*x;
		y = y*y;
		x += y;
		double sqrt = Math.sqrt(x);
		if(sqrt > d)
			return false;
		return true;
		
	}

}
