	import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
	
	public class Main {
	
		public static void main(String[] args) {
			execute17_3();
		}
		
		private static void execute17_3() {
			try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			}
		}
    } import java.util.ArrayDeque; ArrayDeque java.util import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Deque; Deque java.util import java.util.HashMap; HashMap java.util import java.util.HashSet; HashSet java.util import java.util.List; List java.util import java.util.Map; Map java.util import java.util.Queue; Queue java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
	
		public static void main(String[] args) {
			execute17_3();
		}
		
		private static void execute17_3() {
			try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			}
		}
    } Main public static void main(String[] args) {
			execute17_3();
		} main {
			execute17_3();
		} execute17_3() execute17_3 String[] args args private static void execute17_3() {
			try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			}
		} execute17_3 {
			try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			}
		} try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			} {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			} Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc int ans=0; ans 0 for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				} int i=0; int i=0; i 0 i<n i n i++ i++ i {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				} {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					} Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) Math.sqrt Math Math.pow(a, 2) + Math.pow(b, 2) Math.pow(a, 2) Math.pow Math a 2 Math.pow(b, 2) Math.pow Math b 2 d {
						ans++;
					} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans public class Main {
	
		public static void main(String[] args) {
			execute17_3();
		}
		
		private static void execute17_3() {
			try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			}
		}
    } public class Main {
	
		public static void main(String[] args) {
			execute17_3();
		}
		
		private static void execute17_3() {
			try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			}
		}
    } Main
	import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
	
	public class Main {
	
		public static void main(String[] args) {
			execute17_3();
		}
		
		private static void execute17_3() {
			try 
			(Scanner sc = new Scanner(System.in)) {
				int n = sc.nextInt();
				int d = sc.nextInt();
				
				int ans=0;
				for(int i=0; i<n;i++) {
					int a = sc.nextInt();
					int b = sc.nextInt();
					if(Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) <= d) {
						ans++;
					}
				}
				System.out.println(ans);
			}
		}
    }