import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		StringTokenizer st = nl();
		int N = ni(st), D = ni(st);
		int ans = 0;
		for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		}
		out.println(ans);
		
		f.close();
		out.close();
	}

	static final int MOD = 1000000007;

	static BufferedReader f;
	static PrintWriter out;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIO(String s) throws IOException {
		f = new BufferedReader(new FileReader(s + ".in"));
		out = new PrintWriter(new FileWriter(s + ".out"));
	}

	static void setIO() {
		f = (new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		StringTokenizer st = nl();
		int N = ni(st), D = ni(st);
		int ans = 0;
		for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		}
		out.println(ans);
		
		f.close();
		out.close();
	}

	static final int MOD = 1000000007;

	static BufferedReader f;
	static PrintWriter out;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIO(String s) throws IOException {
		f = new BufferedReader(new FileReader(s + ".in"));
		out = new PrintWriter(new FileWriter(s + ".out"));
	}

	static void setIO() {
		f = (new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}
} Main static final int MOD = 1000000007; MOD 1000000007 static BufferedReader f; f static PrintWriter out; out public static void main(String[] args) throws IOException {
		setIO();

		StringTokenizer st = nl();
		int N = ni(st), D = ni(st);
		int ans = 0;
		for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		}
		out.println(ans);
		
		f.close();
		out.close();
	} main {
		setIO();

		StringTokenizer st = nl();
		int N = ni(st), D = ni(st);
		int ans = 0;
		for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		}
		out.println(ans);
		
		f.close();
		out.close();
	} setIO() setIO StringTokenizer st = nl(); st nl() nl int N = ni(st) N ni(st) ni st D = ni(st); D ni(st) ni st int ans = 0; ans 0 for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		} {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		} st = nl() st nl() nl int x = ni(st) x ni(st) ni st y = ni(st); y ni(st) ni st if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			} (long) x * x + (long) y * y <= (long) D * D (long) x * x + (long) y * y (long) x * x (long) x x (long) y * y (long) y y (long) D * D (long) D D {
				ans++;
			} ans++ ans out.println(ans) out.println out ans f.close() f.close f out.close() out.close out String[] args args static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	} ni {
		return Integer.parseInt(st.nextToken());
	} return Integer.parseInt(st.nextToken()); Integer.parseInt(st.nextToken()) Integer.parseInt Integer st.nextToken() st.nextToken st StringTokenizer st st static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	} ni {
		return Integer.parseInt(f.readLine());
	} return Integer.parseInt(f.readLine()); Integer.parseInt(f.readLine()) Integer.parseInt Integer f.readLine() f.readLine f static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	} nl {
		return new StringTokenizer(f.readLine());
	} return new StringTokenizer(f.readLine()); new StringTokenizer(f.readLine()) static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	} nia {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	} StringTokenizer st = nl(); st nl() nl int[] A = new int[N]; A new int[N] N for (int i = 0; i < N; i++)
			A[i] = ni(st); int i = 0; int i = 0; i 0 i < N i N i++ i++ i A[i] = ni(st); A[i] = ni(st) A[i] A i ni(st) ni st return A; A int N N static void setIO(String s) throws IOException {
		f = new BufferedReader(new FileReader(s + ".in"));
		out = new PrintWriter(new FileWriter(s + ".out"));
	} setIO {
		f = new BufferedReader(new FileReader(s + ".in"));
		out = new PrintWriter(new FileWriter(s + ".out"));
	} f = new BufferedReader(new FileReader(s + ".in")) f new BufferedReader(new FileReader(s + ".in")) out = new PrintWriter(new FileWriter(s + ".out")) out new PrintWriter(new FileWriter(s + ".out")) String s s static void setIO() {
		f = (new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	} setIO {
		f = (new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	} f = (new BufferedReader(new InputStreamReader(System.in))) f (new BufferedReader(new InputStreamReader(System.in))) out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) out new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) public class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		StringTokenizer st = nl();
		int N = ni(st), D = ni(st);
		int ans = 0;
		for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		}
		out.println(ans);
		
		f.close();
		out.close();
	}

	static final int MOD = 1000000007;

	static BufferedReader f;
	static PrintWriter out;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIO(String s) throws IOException {
		f = new BufferedReader(new FileReader(s + ".in"));
		out = new PrintWriter(new FileWriter(s + ".out"));
	}

	static void setIO() {
		f = (new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		StringTokenizer st = nl();
		int N = ni(st), D = ni(st);
		int ans = 0;
		for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		}
		out.println(ans);
		
		f.close();
		out.close();
	}

	static final int MOD = 1000000007;

	static BufferedReader f;
	static PrintWriter out;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIO(String s) throws IOException {
		f = new BufferedReader(new FileReader(s + ".in"));
		out = new PrintWriter(new FileWriter(s + ".out"));
	}

	static void setIO() {
		f = (new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}
} Main
import java.util.*;
import java.io.*;

public class Main {
	public static void main(String[] args) throws IOException {
		setIO();

		StringTokenizer st = nl();
		int N = ni(st), D = ni(st);
		int ans = 0;
		for (int i = 0; i < N; i++) {
			st = nl();
			int x = ni(st), y = ni(st);
			if ((long) x * x + (long) y * y <= (long) D * D) {
				ans++;
			}
		}
		out.println(ans);
		
		f.close();
		out.close();
	}

	static final int MOD = 1000000007;

	static BufferedReader f;
	static PrintWriter out;

	static int ni(StringTokenizer st) {
		return Integer.parseInt(st.nextToken());
	}

	static int ni() throws IOException {
		return Integer.parseInt(f.readLine());
	}

	static StringTokenizer nl() throws IOException {
		return new StringTokenizer(f.readLine());
	}

	static int[] nia(int N) throws IOException {
		StringTokenizer st = nl();
		int[] A = new int[N];
		for (int i = 0; i < N; i++)
			A[i] = ni(st);
		return A;
	}

	static void setIO(String s) throws IOException {
		f = new BufferedReader(new FileReader(s + ".in"));
		out = new PrintWriter(new FileWriter(s + ".out"));
	}

	static void setIO() {
		f = (new BufferedReader(new InputStreamReader(System.in)));
		out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
	}
}
