import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int r = 0;
		while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		}
		System.out.println(r);

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

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int r = 0;
		while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		}
		System.out.println(r);

	}
} Main public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int r = 0;
		while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		}
		System.out.println(r);

	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int r = 0;
		while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		}
		System.out.println(r);

	} 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 r = 0; r 0 while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		} n-->0 n-- n 0 {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		} long x = sc.nextLong() x sc.nextLong() sc.nextLong sc y = sc.nextLong(); y sc.nextLong() sc.nextLong sc if (x*x+y*y <= d*d) {
				r++;
			} x*x+y*y <= d*d x*x+y*y x*x x x y*y y y d*d d d {
				r++;
			} r++ r System.out.println(r) System.out.println System.out System System.out r final String[] args args public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int r = 0;
		while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		}
		System.out.println(r);

	}
} public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int r = 0;
		while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		}
		System.out.println(r);

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(final String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		long d = sc.nextLong();
		int r = 0;
		while(n-->0) {
			long x = sc.nextLong(), y = sc.nextLong();
			if (x*x+y*y <= d*d) {
				r++;
			}
		}
		System.out.println(r);

	}
}
