import java.util.Scanner;
import java.lang.Math;

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;
		for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		}
		System.out.println(count);
	}
} import java.util.Scanner; Scanner java.util import java.lang.Math; Math java.lang 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;
		for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		}
		System.out.println(count);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int D = sc.nextInt();

		int count = 0;
		for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		}
		System.out.println(count);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int D = sc.nextInt();

		int count = 0;
		for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= 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 for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		} int n = 0; int n = 0; n 0 n < N n N n++ n++ n {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		} {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		} long x = sc.nextLong(); x sc.nextLong() sc.nextLong sc long y = sc.nextLong(); y sc.nextLong() sc.nextLong sc double d = Math.sqrt(x * x + y *y); d Math.sqrt(x * x + y *y) Math.sqrt Math x * x + y *y x * x x x y *y y y if (d <= D) {
				count++;
			} d <= D d D {
				count++;
			} 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();
		int D = sc.nextInt();

		int count = 0;
		for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= 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();
		int D = sc.nextInt();

		int count = 0;
		for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		}
		System.out.println(count);
	}
} Main
import java.util.Scanner;
import java.lang.Math;

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;
		for (int n = 0; n < N; n++) {
			long x = sc.nextLong();
			long y = sc.nextLong();
			double d = Math.sqrt(x * x + y *y);
			if (d <= D) {
				count++;
			}
		}
		System.out.println(count);
	}
}
