import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;



public class Main {

	public static void main(String[] args) {
		 FastScanner scanner =new FastScanner();
		 PrintWriter out=new PrintWriter(System.out);
		  int n=scanner.nextInt();
		  long d=scanner.nextLong();
		  int ans=0;
		  for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  }	
		  System.out.println(ans);
			
		
	
		    	
		    }
	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.io.PrintWriter; PrintWriter java.io import java.math.BigInteger; BigInteger java.math import java.util.StringTokenizer; StringTokenizer java.util public class Main {

	public static void main(String[] args) {
		 FastScanner scanner =new FastScanner();
		 PrintWriter out=new PrintWriter(System.out);
		  int n=scanner.nextInt();
		  long d=scanner.nextLong();
		  int ans=0;
		  for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  }	
		  System.out.println(ans);
			
		
	
		    	
		    }
	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 scanner =new FastScanner();
		 PrintWriter out=new PrintWriter(System.out);
		  int n=scanner.nextInt();
		  long d=scanner.nextLong();
		  int ans=0;
		  for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  }	
		  System.out.println(ans);
			
		
	
		    	
		    } main {
		 FastScanner scanner =new FastScanner();
		 PrintWriter out=new PrintWriter(System.out);
		  int n=scanner.nextInt();
		  long d=scanner.nextLong();
		  int ans=0;
		  for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  }	
		  System.out.println(ans);
			
		
	
		    	
		    } FastScanner scanner =new FastScanner(); scanner new FastScanner() PrintWriter out=new PrintWriter(System.out); out new PrintWriter(System.out) int n=scanner.nextInt(); n scanner.nextInt() scanner.nextInt scanner long d=scanner.nextLong(); d scanner.nextLong() scanner.nextLong scanner int ans=0; ans 0 for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  } int i=0; int i=0; i 0 i<n i n i++ i++ i {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  } {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  } long x=scanner.nextLong() x scanner.nextLong() scanner.nextLong scanner y=scanner.nextLong(); y scanner.nextLong() scanner.nextLong scanner BigInteger bi1=BigInteger.valueOf(x*x); bi1 BigInteger.valueOf(x*x) BigInteger.valueOf BigInteger x*x x x BigInteger bi2=BigInteger.valueOf(y*y); bi2 BigInteger.valueOf(y*y) BigInteger.valueOf BigInteger y*y y y BigInteger bi=bi1.add(bi2); bi bi1.add(bi2) bi1.add bi1 bi2 BigInteger b1=BigInteger.valueOf(d*d); b1 BigInteger.valueOf(d*d) BigInteger.valueOf BigInteger d*d d d if(bi.compareTo(b1)<=0) ans++; bi.compareTo(b1)<=0 bi.compareTo(b1) bi.compareTo bi b1 0 ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args 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 scanner =new FastScanner();
		 PrintWriter out=new PrintWriter(System.out);
		  int n=scanner.nextInt();
		  long d=scanner.nextLong();
		  int ans=0;
		  for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  }	
		  System.out.println(ans);
			
		
	
		    	
		    }
	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 scanner =new FastScanner();
		 PrintWriter out=new PrintWriter(System.out);
		  int n=scanner.nextInt();
		  long d=scanner.nextLong();
		  int ans=0;
		  for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  }	
		  System.out.println(ans);
			
		
	
		    	
		    }
	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.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;



public class Main {

	public static void main(String[] args) {
		 FastScanner scanner =new FastScanner();
		 PrintWriter out=new PrintWriter(System.out);
		  int n=scanner.nextInt();
		  long d=scanner.nextLong();
		  int ans=0;
		  for(int i=0;i<n;i++) {
			  long x=scanner.nextLong(),y=scanner.nextLong();
			  BigInteger bi1=BigInteger.valueOf(x*x);
			  BigInteger bi2=BigInteger.valueOf(y*y);
			  //long t1=x*x, t2=y*y;
			//  System.out.println(t1+" "+t2);
			 BigInteger bi=bi1.add(bi2);
			 // System.out.println(bi);
			 
			  //System.out.println(dis);
			 BigInteger b1=BigInteger.valueOf(d*d);
			// System.out.println(bi+" "+b1);
			  if(bi.compareTo(b1)<=0) ans++;
		  }	
		  System.out.println(ans);
			
		
	
		    	
		    }
	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());
		}
}

		    
		}