import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int ans = 0;
		long dd = d * d;
		// System.out.println("d: " + d);
		// System.out.println("dd: " + dd);
		for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		}
		System.out.println(ans);
	}
}





 import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int ans = 0;
		long dd = d * d;
		// System.out.println("d: " + d);
		// System.out.println("dd: " + dd);
		for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int ans = 0;
		long dd = d * d;
		// System.out.println("d: " + d);
		// System.out.println("dd: " + dd);
		for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int ans = 0;
		long dd = d * d;
		// System.out.println("d: " + d);
		// System.out.println("dd: " + dd);
		for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		}
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc int ans = 0; ans 0 long dd = d * d; dd d * d d d for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		} {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		} long a = sc.nextLong(); a sc.nextLong() sc.nextLong sc long b = sc.nextLong(); b sc.nextLong() sc.nextLong sc long aa = a * a; aa a * a a a if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			} aa <= dd aa dd {
				if (aa + b * b <= dd) {
					ans++;
				}
			} if (aa + b * b <= dd) {
					ans++;
				} aa + b * b <= dd aa + b * b aa b * b b b dd {
					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 sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int ans = 0;
		long dd = d * d;
		// System.out.println("d: " + d);
		// System.out.println("dd: " + dd);
		for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int ans = 0;
		long dd = d * d;
		// System.out.println("d: " + d);
		// System.out.println("dd: " + dd);
		for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		}
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int ans = 0;
		long dd = d * d;
		// System.out.println("d: " + d);
		// System.out.println("dd: " + dd);
		for (int i = 0; i < n; i++) {
			long a = sc.nextLong();
			long b = sc.nextLong();
			long aa = a * a;
			if (aa <= dd) {
				if (aa + b * b <= dd) {
					ans++;
				}
			}
		}
		System.out.println(ans);
	}
}






