import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;

public class Main {

	public static void main(String[] args) throws IOException,NumberFormatException{
		try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		}

	}
	public static boolean isDigit(long n) {
		int count9=0;
		while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		}
		if(count9>=1) {
			return true;
		}
		return false;
	}
	public static long prod(long n) {
		long prod=1;
		while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		}
		return prod;
	}
	
	public static long LCM(long a,long b) {
			return (a*b)/GCD(a,b);
	}
	public static long GCD(long a,long b) {
		if(b==0)
			return a;
		return GCD(b,a%b);
	}
    
	public 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) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		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.util.*; util.* java import java.math.*; math.* java public class Main {

	public static void main(String[] args) throws IOException,NumberFormatException{
		try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		}

	}
	public static boolean isDigit(long n) {
		int count9=0;
		while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		}
		if(count9>=1) {
			return true;
		}
		return false;
	}
	public static long prod(long n) {
		long prod=1;
		while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		}
		return prod;
	}
	
	public static long LCM(long a,long b) {
			return (a*b)/GCD(a,b);
	}
	public static long GCD(long a,long b) {
		if(b==0)
			return a;
		return GCD(b,a%b);
	}
    
	public 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) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		
	}
} Main public static void main(String[] args) throws IOException,NumberFormatException{
		try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		}

	} main {
		try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		}

	} try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		} catch(Exception e) {
			return ;
		} Exception e {
			return ;
		} return ; {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		} FastScanner sc=new FastScanner(); sc new FastScanner() long n=sc.nextLong() n sc.nextLong() sc.nextLong sc d=sc.nextLong(); d sc.nextLong() sc.nextLong sc d*=d d d int count=0; count 0 for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   } int i=0; int i=0; i 0 i<n i n i++ i++ i {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   } {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   } long x=sc.nextLong() x sc.nextLong() sc.nextLong sc y=sc.nextLong(); y sc.nextLong() sc.nextLong sc if((x*x)+(y*y)<=d) {
				   count++;
			   } (x*x)+(y*y)<=d (x*x)+(y*y) (x*x) x x (y*y) y y d {
				   count++;
			   } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static boolean isDigit(long n) {
		int count9=0;
		while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		}
		if(count9>=1) {
			return true;
		}
		return false;
	} isDigit {
		int count9=0;
		while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		}
		if(count9>=1) {
			return true;
		}
		return false;
	} int count9=0; count9 0 while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		} n!=0 n 0 {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		} long temp=n%10; temp n%10 n 10 if(temp==0)
				return false; temp==0 temp 0 return false; false if(temp==9)
				count9++; temp==9 temp 9 count9++ count9 n/=10 n 10 if(count9>=1) {
			return true;
		} count9>=1 count9 1 {
			return true;
		} return true; true return false; false long n n public static long prod(long n) {
		long prod=1;
		while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		}
		return prod;
	} prod {
		long prod=1;
		while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		}
		return prod;
	} long prod=1; prod 1 while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		} n!=0 n 0 {
			prod=prod*(n%10);
			n/=10;
		} prod=prod*(n%10) prod prod*(n%10) prod (n%10) n 10 n/=10 n 10 return prod; prod long n n public static long LCM(long a,long b) {
			return (a*b)/GCD(a,b);
	} LCM {
			return (a*b)/GCD(a,b);
	} return (a*b)/GCD(a,b); (a*b)/GCD(a,b) (a*b) a b GCD(a,b) GCD a b long a a long b b public static long GCD(long a,long b) {
		if(b==0)
			return a;
		return GCD(b,a%b);
	} GCD {
		if(b==0)
			return a;
		return GCD(b,a%b);
	} if(b==0)
			return a; b==0 b 0 return a; a return GCD(b,a%b); GCD(b,a%b) GCD b a%b a b long a a long b b public 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) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		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) {}
			return st.nextToken();
		} next {
			while (!st.hasMoreTokens())
				try { 
                                      st=new StringTokenizer(br.readLine());				               
                              } catch (IOException e) {}
			return st.nextToken();
		} while (!st.hasMoreTokens())
				try { 
                                      st=new StringTokenizer(br.readLine());				               
                              } catch (IOException e) {} !st.hasMoreTokens() st.hasMoreTokens() st.hasMoreTokens st try { 
                                      st=new StringTokenizer(br.readLine());				               
                              } catch (IOException e) {} catch (IOException e) {} IOException 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 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) throws IOException,NumberFormatException{
		try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		}

	}
	public static boolean isDigit(long n) {
		int count9=0;
		while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		}
		if(count9>=1) {
			return true;
		}
		return false;
	}
	public static long prod(long n) {
		long prod=1;
		while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		}
		return prod;
	}
	
	public static long LCM(long a,long b) {
			return (a*b)/GCD(a,b);
	}
	public static long GCD(long a,long b) {
		if(b==0)
			return a;
		return GCD(b,a%b);
	}
    
	public 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) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		
	}
} public class Main {

	public static void main(String[] args) throws IOException,NumberFormatException{
		try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		}

	}
	public static boolean isDigit(long n) {
		int count9=0;
		while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		}
		if(count9>=1) {
			return true;
		}
		return false;
	}
	public static long prod(long n) {
		long prod=1;
		while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		}
		return prod;
	}
	
	public static long LCM(long a,long b) {
			return (a*b)/GCD(a,b);
	}
	public static long GCD(long a,long b) {
		if(b==0)
			return a;
		return GCD(b,a%b);
	}
    
	public 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) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.*;
import java.math.*;

public class Main {

	public static void main(String[] args) throws IOException,NumberFormatException{
		try {
		   FastScanner sc=new FastScanner();
		   long n=sc.nextLong(),d=sc.nextLong();
		   d*=d;
		   int count=0;
		   for(int i=0;i<n;i++) {
			   long x=sc.nextLong(),y=sc.nextLong();
			   if((x*x)+(y*y)<=d) {
				   count++;
			   }
		   }
		   System.out.println(count);
		}
		catch(Exception e) {
			return ;
		}

	}
	public static boolean isDigit(long n) {
		int count9=0;
		while(n!=0) {
			long temp=n%10;
			if(temp==0)
				return false;
			if(temp==9)
				count9++;
			n/=10;
		}
		if(count9>=1) {
			return true;
		}
		return false;
	}
	public static long prod(long n) {
		long prod=1;
		while(n!=0) {
			prod=prod*(n%10);
			n/=10;
		}
		return prod;
	}
	
	public static long LCM(long a,long b) {
			return (a*b)/GCD(a,b);
	}
	public static long GCD(long a,long b) {
		if(b==0)
			return a;
		return GCD(b,a%b);
	}
    
	public 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) {}
			return st.nextToken();
		}
		
		int nextInt() {
			return Integer.parseInt(next());
		}
		long nextLong() {
			return Long.parseLong(next());
		}
		
	}
}
