import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		}
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		}
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		} sc.hasNext() sc.hasNext sc {
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		} int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long D = sc.nextLong(); D sc.nextLong() sc.nextLong sc int count = 0; count 0 for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			} int i = 0; int i = 0; i 0 i< N i N i++ i++ i {
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			} {
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			} long x = sc.nextLong(); x sc.nextLong() sc.nextLong sc long y = sc.nextLong(); y sc.nextLong() sc.nextLong sc if(x*x + y*y <= D*D){
					count++;
				} x*x + y*y <= D*D x*x + y*y x*x x x y*y y y D*D D D {
					count++;
				} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		}
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		while(sc.hasNext()){
			int N = sc.nextInt();
			long D = sc.nextLong();
			int count = 0;
			for(int i = 0; i< N; i++){
				long x = sc.nextLong();
				long y = sc.nextLong();
				if(x*x + y*y <= D*D){
					count++;
				}
			}
			System.out.println(count);
		}
	}
}