import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long d = scan.nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int count = 0;
		for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		}

		System.out.print(count);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long d = scan.nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int count = 0;
		for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		}

		System.out.print(count);
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long d = scan.nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int count = 0;
		for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		}

		System.out.print(count);
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long d = scan.nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int count = 0;
		for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		}

		System.out.print(count);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan long d = scan.nextInt(); d scan.nextInt() scan.nextInt scan long[] x = new long[n]; x new long[n] n long[] y = new long[n]; y new long[n] n for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		} {
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		} x[i] = scan.nextInt() x[i] x i scan.nextInt() scan.nextInt scan y[i] = scan.nextInt() y[i] y i scan.nextInt() scan.nextInt scan int count = 0; count 0 for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		} {
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		} long distance = x[i]*x[i] + y[i]*y[i]; distance x[i]*x[i] + y[i]*y[i] x[i]*x[i] x[i] x i x[i] x i y[i]*y[i] y[i] y i y[i] y i count += distance <= d*d? 1 : 0 count distance <= d*d? 1 : 0 distance <= d*d distance d*d d d 1 0 System.out.print(count) System.out.print System.out System System.out count String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long d = scan.nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int count = 0;
		for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		}

		System.out.print(count);
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long d = scan.nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int count = 0;
		for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		}

		System.out.print(count);
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		long d = scan.nextInt();
		long[] x = new long[n];
		long[] y = new long[n];
		for(int i = 0;i < n; ++i){
			x[i] = scan.nextInt();
			y[i] = scan.nextInt();
		}
		int count = 0;
		for(int i = 0;i < n; ++i){
			long distance = x[i]*x[i] + y[i]*y[i];
			count += distance <= d*d? 1 : 0;
		}

		System.out.print(count);
	}
}
