import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n; n long d; d n = scan.nextInt() n scan.nextInt() scan.nextInt scan d = scan.nextLong() d scan.nextLong() scan.nextLong scan int ans = 0; ans 0 for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		} {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		} long x x y; y x = scan.nextLong() x scan.nextLong() scan.nextLong scan y = scan.nextLong() y scan.nextLong() scan.nextLong scan if (x*x+y*y <= d*d) {
				ans++;
			} x*x+y*y <= d*d x*x+y*y x*x x x y*y y y d*d d d {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n;
		long d;
		n = scan.nextInt();
		d = scan.nextLong();
		int ans = 0;
		for (int i = 0; i < n; i++) {
			long x,y;
			x = scan.nextLong();
			y = scan.nextLong();
			if (x*x+y*y <= d*d) {
				ans++;
			}
		}
		System.out.println(ans);
	}
}