import java.util.Scanner;

public class Main{
	public static void main(String args[]){
      Scanner scan = new Scanner(System.in);
      long N = scan.nextInt();
      long D = scan.nextInt();

      int ans = 0;
      for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      }
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String args[]){
      Scanner scan = new Scanner(System.in);
      long N = scan.nextInt();
      long D = scan.nextInt();

      int ans = 0;
      for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      }
        System.out.println(ans);
    }
} Main public static void main(String args[]){
      Scanner scan = new Scanner(System.in);
      long N = scan.nextInt();
      long D = scan.nextInt();

      int ans = 0;
      for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      }
        System.out.println(ans);
    } main {
      Scanner scan = new Scanner(System.in);
      long N = scan.nextInt();
      long D = scan.nextInt();

      int ans = 0;
      for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      }
        System.out.println(ans);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long N = scan.nextInt(); N scan.nextInt() scan.nextInt scan long D = scan.nextInt(); D scan.nextInt() scan.nextInt scan int ans = 0; ans 0 for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      } {
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      } long x = scan.nextInt(); x scan.nextInt() scan.nextInt scan long y = scan.nextInt(); y scan.nextInt() scan.nextInt scan if((x * x + y * y) <= D * D){
            ans++;
        } (x * x + y * y) <= D * D (x * x + y * y) x * x x x y * y y y D * D D D {
            ans++;
        } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args public class Main{
	public static void main(String args[]){
      Scanner scan = new Scanner(System.in);
      long N = scan.nextInt();
      long D = scan.nextInt();

      int ans = 0;
      for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      }
        System.out.println(ans);
    }
} public class Main{
	public static void main(String args[]){
      Scanner scan = new Scanner(System.in);
      long N = scan.nextInt();
      long D = scan.nextInt();

      int ans = 0;
      for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main{
	public static void main(String args[]){
      Scanner scan = new Scanner(System.in);
      long N = scan.nextInt();
      long D = scan.nextInt();

      int ans = 0;
      for(int i = 0;i < N;i++){
        long x = scan.nextInt();
        long y = scan.nextInt();
        if((x * x + y * y) <= D * D){
            ans++;
        }
      }
        System.out.println(ans);
    }
}