import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long D = sc.nextLong();
		int ans = 0;

		for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long D = sc.nextLong();
		int ans = 0;

		for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long D = sc.nextLong();
		int ans = 0;

		for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long D = sc.nextLong();
		int ans = 0;

		for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long D = sc.nextLong(); D sc.nextLong() sc.nextLong sc int ans = 0; ans 0 for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.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 = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		} {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		} long X = sc.nextLong(); X sc.nextLong() sc.nextLong sc long Y = sc.nextLong(); Y sc.nextLong() sc.nextLong sc 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 sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long D = sc.nextLong();
		int ans = 0;

		for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long D = sc.nextLong();
		int ans = 0;

		for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
} Main
import java.util.Scanner;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		long N = sc.nextLong();
		long D = sc.nextLong();
		int ans = 0;

		for(int i = 0; i < N; i++) {
			long X = sc.nextLong();
			long Y = sc.nextLong();
			if(X * X + Y * Y <= D * D) {
				ans++;
			}
		}
		System.out.println(ans);
		sc.close();
	}
}
