import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		}
	}

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

} Main public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		}
	} main {
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		}
	} try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		} {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		} 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 long d = sc.nextLong(); d sc.nextLong() sc.nextLong sc long d2 = d * d; d2 d * d d d 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 <= d2 ) {
					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 <= d2 ) {
					count++;
				}
			} {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					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 <= d2 ) {
					count++;
				} x * x + y * y <= d2 x * x + y * y x * x x x y * y y y d2 {
					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){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		}
	}

} public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		}
	}

} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		try(Scanner sc = new Scanner(System.in)) {
			
			int n = sc.nextInt();
			
			long d = sc.nextLong();
			long d2 = d * d;
			
			int count = 0; 
			for(int i = 0 ; i < n ; i++ ) {
				long x = sc.nextLong();
				long y = sc.nextLong();
				
				if ( x * x + y * y <= d2 ) {
					count++;
				}
			}
			
			System.out.println(count);
		}
	}

}