import java.io.PrintWriter;
import java.util.*;
public class Main{
	
	public static void main(String[]args) {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		long d=sc.nextLong();
		int c=0;
		for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		}
		out.println(c);
		out.close();
	}
} import java.io.PrintWriter; PrintWriter java.io import java.util.*; util.* java public class Main{
	
	public static void main(String[]args) {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		long d=sc.nextLong();
		int c=0;
		for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		}
		out.println(c);
		out.close();
	}
} Main public static void main(String[]args) {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		long d=sc.nextLong();
		int c=0;
		for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		}
		out.println(c);
		out.close();
	} main {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		long d=sc.nextLong();
		int c=0;
		for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		}
		out.println(c);
		out.close();
	} PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) Scanner sc=new Scanner (System.in); sc new Scanner (System.in) int n=sc.nextInt(); n sc.nextInt() sc.nextInt sc long d=sc.nextLong(); d sc.nextLong() sc.nextLong sc int c=0; c 0 for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		} {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		} long a=sc.nextLong(); a sc.nextLong() sc.nextLong sc long b=sc.nextLong(); b sc.nextLong() sc.nextLong sc if((a*a+b*b)<=d*d)c++; (a*a+b*b)<=d*d (a*a+b*b) a*a a a b*b b b d*d d d c++ c out.println(c) out.println out c out.close() out.close out String[]args args public class Main{
	
	public static void main(String[]args) {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		long d=sc.nextLong();
		int c=0;
		for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		}
		out.println(c);
		out.close();
	}
} public class Main{
	
	public static void main(String[]args) {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		long d=sc.nextLong();
		int c=0;
		for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		}
		out.println(c);
		out.close();
	}
} Main
import java.io.PrintWriter;
import java.util.*;
public class Main{
	
	public static void main(String[]args) {
		PrintWriter out = new PrintWriter(System.out);
		Scanner sc=new Scanner (System.in);
		int n=sc.nextInt();
		long d=sc.nextLong();
		int c=0;
		for(int i=0;i<n;i++) {
			long a=sc.nextLong();
			long b=sc.nextLong();
			if((a*a+b*b)<=d*d)c++;
		}
		out.println(c);
		out.close();
	}
}