import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;

public class Main {

	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
	   
	    	int n=fs.nextInt();
	        long d=fs.nextLong();
	        long a[][]=new long[n][2];
	        for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        }
	        int count=0;
	        for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        }
	        System.out.println(count);
	    }
	
	
	static void sort(int[] a ) {
		ArrayList<Integer> l = new ArrayList<>();
		for(int i:a) l.add(i);
		Collections.sort(l);
		for(int i=0;i<l.size();i++) a[i]=l.get(i);
	}
	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java import java.util.Map.Entry; Entry java.util.Map public class Main {

	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
	   
	    	int n=fs.nextInt();
	        long d=fs.nextLong();
	        long a[][]=new long[n][2];
	        for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        }
	        int count=0;
	        for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        }
	        System.out.println(count);
	    }
	
	
	static void sort(int[] a ) {
		ArrayList<Integer> l = new ArrayList<>();
		for(int i:a) l.add(i);
		Collections.sort(l);
		for(int i=0;i<l.size();i++) a[i]=l.get(i);
	}
	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

} Main public static void main(String[] args) {
		FastScanner fs = new FastScanner();
	   
	    	int n=fs.nextInt();
	        long d=fs.nextLong();
	        long a[][]=new long[n][2];
	        for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        }
	        int count=0;
	        for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        }
	        System.out.println(count);
	    } main {
		FastScanner fs = new FastScanner();
	   
	    	int n=fs.nextInt();
	        long d=fs.nextLong();
	        long a[][]=new long[n][2];
	        for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        }
	        int count=0;
	        for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        }
	        System.out.println(count);
	    } FastScanner fs = new FastScanner(); fs new FastScanner() int n=fs.nextInt(); n fs.nextInt() fs.nextInt fs long d=fs.nextLong(); d fs.nextLong() fs.nextLong fs long a[][]=new long[n][2]; a new long[n][2] n 2 for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        } {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        } a[i][0]=fs.nextLong() a[i][0] a[i] a i 0 fs.nextLong() fs.nextLong fs a[i][1]=fs.nextLong() a[i][1] a[i] a i 1 fs.nextLong() fs.nextLong fs int count=0; count 0 for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        } {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        } long t1=a[i][0]*a[i][0]; t1 a[i][0]*a[i][0] a[i][0] a[i] a i 0 a[i][0] a[i] a i 0 t1=t1<0?-t1:t1 t1 t1<0?-t1:t1 t1<0 t1 0 -t1 t1 t1 long t2=a[i][1]*a[i][1]; t2 a[i][1]*a[i][1] a[i][1] a[i] a i 1 a[i][1] a[i] a i 1 t2=t2<t2?-t2:t2 t2 t2<t2?-t2:t2 t2<t2 t2 t2 -t2 t2 t2 double temp=Math.sqrt(t1+t2); temp Math.sqrt(t1+t2) Math.sqrt Math t1+t2 t1 t2 temp=Math.ceil(temp) temp Math.ceil(temp) Math.ceil Math temp if( temp-d<=0) {
	        		count++;
	        	} temp-d<=0 temp-d temp d 0 {
	        		count++;
	        	} count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args static void sort(int[] a ) {
		ArrayList<Integer> l = new ArrayList<>();
		for(int i:a) l.add(i);
		Collections.sort(l);
		for(int i=0;i<l.size();i++) a[i]=l.get(i);
	} sort {
		ArrayList<Integer> l = new ArrayList<>();
		for(int i:a) l.add(i);
		Collections.sort(l);
		for(int i=0;i<l.size();i++) a[i]=l.get(i);
	} ArrayList<Integer> l = new ArrayList<>(); l new ArrayList<>() for(int i:a) l.add(i); int i a l.add(i); l.add(i) l.add l i Collections.sort(l) Collections.sort Collections l for(int i=0;i<l.size();i++) a[i]=l.get(i); int i=0; int i=0; i 0 i<l.size() i l.size() l.size l i++ i++ i a[i]=l.get(i); a[i]=l.get(i) a[i] a i l.get(i) l.get l i int[] a a static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	} FastScanner BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringTokenizer st = new StringTokenizer(""); st new StringTokenizer("") String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		} next {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		} while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				} !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				} catch(IOException e) {
					e.printStackTrace();
				} IOException e {
					e.printStackTrace();
				} e.printStackTrace() e.printStackTrace e {
					st = new StringTokenizer(br.readLine());
				} st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() {
			return Integer.parseInt(next());
		} nextInt {
			return Integer.parseInt(next());
		} return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next int[] readArray(int n) {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		} readArray {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		} int[] a = new int[n]; a new int[n] n for(int i=0;i<n;i++)a[i]=nextInt(); int i=0; int i=0; i 0 i<n i n i++ i++ i a[i]=nextInt(); a[i]=nextInt() a[i] a i nextInt() nextInt return a; a int n n long nextLong() {
			return Long.parseLong(next());
		} nextLong {
			return Long.parseLong(next());
		} return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next public class Main {

	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
	   
	    	int n=fs.nextInt();
	        long d=fs.nextLong();
	        long a[][]=new long[n][2];
	        for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        }
	        int count=0;
	        for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        }
	        System.out.println(count);
	    }
	
	
	static void sort(int[] a ) {
		ArrayList<Integer> l = new ArrayList<>();
		for(int i:a) l.add(i);
		Collections.sort(l);
		for(int i=0;i<l.size();i++) a[i]=l.get(i);
	}
	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

} public class Main {

	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
	   
	    	int n=fs.nextInt();
	        long d=fs.nextLong();
	        long a[][]=new long[n][2];
	        for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        }
	        int count=0;
	        for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        }
	        System.out.println(count);
	    }
	
	
	static void sort(int[] a ) {
		ArrayList<Integer> l = new ArrayList<>();
		for(int i:a) l.add(i);
		Collections.sort(l);
		for(int i=0;i<l.size();i++) a[i]=l.get(i);
	}
	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;

public class Main {

	public static void main(String[] args) {
		FastScanner fs = new FastScanner();
	   
	    	int n=fs.nextInt();
	        long d=fs.nextLong();
	        long a[][]=new long[n][2];
	        for(int i=0;i<n;i++) {
	        	a[i][0]=fs.nextLong();
	        	a[i][1]=fs.nextLong();
	        	
	        }
	        int count=0;
	        for(int i=0;i<n;i++) {
	        	long t1=a[i][0]*a[i][0];
	        	t1=t1<0?-t1:t1;
	        	long t2=a[i][1]*a[i][1];
	        	t2=t2<t2?-t2:t2;
	        	double temp=Math.sqrt(t1+t2);
	        	temp=Math.ceil(temp);
//	        	System.out.println(temp);
	        	if( temp-d<=0) {
	        		count++;
	        	}
	        }
	        System.out.println(count);
	    }
	
	
	static void sort(int[] a ) {
		ArrayList<Integer> l = new ArrayList<>();
		for(int i:a) l.add(i);
		Collections.sort(l);
		for(int i=0;i<l.size();i++) a[i]=l.get(i);
	}
	static class FastScanner {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer("");
		String next() {
			while(!st.hasMoreTokens())
				try {
					st = new StringTokenizer(br.readLine());
				}catch(IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		int nextInt() {
			return Integer.parseInt(next());
		}
		int[] readArray(int n) {
			int[] a = new int[n];
			for(int i=0;i<n;i++)a[i]=nextInt();
			return a;
		}
		long nextLong() {
			return Long.parseLong(next());
		}
	}

}
