import java.util.Scanner;

/**
 * @author: Happy
 * @date:2020年8月2日 下午8:23:01
 */
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int d=in.nextInt();
		int sum=0;
		for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		}
		System.out.println(sum);
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int d=in.nextInt();
		int sum=0;
		for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		}
		System.out.println(sum);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int d=in.nextInt();
		int sum=0;
		for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		}
		System.out.println(sum);
	} main {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int d=in.nextInt();
		int sum=0;
		for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		}
		System.out.println(sum);
	} Scanner in=new Scanner(System.in); in new Scanner(System.in) int n=in.nextInt(); n in.nextInt() in.nextInt in int d=in.nextInt(); d in.nextInt() in.nextInt in int sum=0; sum 0 for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		} {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		} long x=in.nextInt(); x in.nextInt() in.nextInt in long y=in.nextInt(); y in.nextInt() in.nextInt in double dis=Math.sqrt(x*x+y*y); dis Math.sqrt(x*x+y*y) Math.sqrt Math x*x+y*y x*x x x y*y y y if(dis<=d){
				sum++;
			} dis<=d dis d {
				sum++;
			} sum++ sum System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int d=in.nextInt();
		int sum=0;
		for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		}
		System.out.println(sum);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int d=in.nextInt();
		int sum=0;
		for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		}
		System.out.println(sum);
	}

} Main
import java.util.Scanner;

/**
 * @author: Happy
 * @date:2020年8月2日 下午8:23:01
 */
public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		int n=in.nextInt();
		int d=in.nextInt();
		int sum=0;
		for (int i = 0; i < n; i++) {
			long x=in.nextInt();
			long y=in.nextInt();
			double dis=Math.sqrt(x*x+y*y);
			if(dis<=d){
				sum++;
			}
		}
		System.out.println(sum);
	}

}