import java.util.Scanner;

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

		// 入力値の取得
		int N = sc.nextInt();
		long D = sc.nextInt();
		
		int count = 0;
		for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		}
		
		// 結果の出力
		System.out.println(count);
		
		sc.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int N = sc.nextInt();
		long D = sc.nextInt();
		
		int count = 0;
		for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		}
		
		// 結果の出力
		System.out.println(count);
		
		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int N = sc.nextInt();
		long D = sc.nextInt();
		
		int count = 0;
		for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		}
		
		// 結果の出力
		System.out.println(count);
		
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int N = sc.nextInt();
		long D = sc.nextInt();
		
		int count = 0;
		for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		}
		
		// 結果の出力
		System.out.println(count);
		
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long D = sc.nextInt(); D sc.nextInt() sc.nextInt sc int count = 0; count 0 for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		} {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		} long X = sc.nextInt(); X sc.nextInt() sc.nextInt sc long Y = sc.nextInt(); Y sc.nextInt() sc.nextInt sc if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			} (D * D) >= ((X * X) + (Y * Y)) (D * D) D D ((X * X) + (Y * Y)) (X * X) X X (Y * Y) Y Y {
				count++;
			} count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc 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.nextInt();
		
		int count = 0;
		for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		}
		
		// 結果の出力
		System.out.println(count);
		
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		// 入力値の取得
		int N = sc.nextInt();
		long D = sc.nextInt();
		
		int count = 0;
		for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		}
		
		// 結果の出力
		System.out.println(count);
		
		sc.close();
	}
} Main
import java.util.Scanner;

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

		// 入力値の取得
		int N = sc.nextInt();
		long D = sc.nextInt();
		
		int count = 0;
		for (int i = 0; i < N; i++) {
			long X = sc.nextInt();
			long Y = sc.nextInt();
			if ((D * D) >= ((X * X) + (Y * Y))) {
				count++;
			}
		}
		
		// 結果の出力
		System.out.println(count);
		
		sc.close();
	}
}
