import java.util.*;

public class Main {
  public static void main(String[] args) {
  	
    try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    }
  }
  
  private static int calc(int d, Scanner scan) {
  	if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    }
    
    return 0;
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
  	
    try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    }
  }
  
  private static int calc(int d, Scanner scan) {
  	if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    }
    
    return 0;
  }
} Main public static void main(String[] args) {
  	
    try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    }
  } main {
  	
    try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    }
  } try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    } {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    } Scanner scan = new Scanner(System.in) Scanner scan = new Scanner(System.in) new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int d = scan.nextInt(); d scan.nextInt() scan.nextInt scan int result = 0; result 0 for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      	result += calc(d, scan);
      } {
      	result += calc(d, scan);
      } result += calc(d, scan) result calc(d, scan) calc d scan System.out.println(result) System.out.println System.out System System.out result String[] args args private static int calc(int d, Scanner scan) {
  	if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    }
    
    return 0;
  } calc {
  	if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    }
    
    return 0;
  } if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    } Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) Math.sqrt Math Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2) Math.pow(scan.nextInt(), 2) Math.pow Math scan.nextInt() scan.nextInt scan 2 Math.pow(scan.nextInt(), 2) Math.pow Math scan.nextInt() scan.nextInt scan 2 d {
    	return 1;
    } return 1; 1 return 0; 0 int d d Scanner scan scan public class Main {
  public static void main(String[] args) {
  	
    try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    }
  }
  
  private static int calc(int d, Scanner scan) {
  	if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    }
    
    return 0;
  }
} public class Main {
  public static void main(String[] args) {
  	
    try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    }
  }
  
  private static int calc(int d, Scanner scan) {
  	if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    }
    
    return 0;
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
  	
    try (Scanner scan = new Scanner(System.in)) {
      
      int n = scan.nextInt();
      int d = scan.nextInt();
      int result = 0;
      for (int i = 0; i < n; i++) {
      	result += calc(d, scan);
      }
      System.out.println(result);
    }
  }
  
  private static int calc(int d, Scanner scan) {
  	if (Math.sqrt(Math.pow(scan.nextInt(), 2) + Math.pow(scan.nextInt(), 2)) <= d) {
    	return 1;
    }
    
    return 0;
  }
}