import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int D = sc.nextInt();
    int ans = 0;
    for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    }
    
    System.out.print(ans);
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int D = sc.nextInt();
    int ans = 0;
    for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    }
    
    System.out.print(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int D = sc.nextInt();
    int ans = 0;
    for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    }
    
    System.out.print(ans);
  } main {
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int D = sc.nextInt();
    int ans = 0;
    for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    }
    
    System.out.print(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int D = sc.nextInt(); D sc.nextInt() sc.nextInt sc int ans = 0; ans 0 for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    } {
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    } int p = sc.nextInt(); p sc.nextInt() sc.nextInt sc int q = sc.nextInt(); q sc.nextInt() sc.nextInt sc double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2)); dist Math.sqrt(Math.pow(p,2)+Math.pow(q,2)) Math.sqrt Math Math.pow(p,2)+Math.pow(q,2) Math.pow(p,2) Math.pow Math p 2 Math.pow(q,2) Math.pow Math q 2 if(dist<=D) ans++; dist<=D dist D ans++ ans System.out.print(ans) System.out.print System.out System System.out ans String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int D = sc.nextInt();
    int ans = 0;
    for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    }
    
    System.out.print(ans);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int D = sc.nextInt();
    int ans = 0;
    for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    }
    
    System.out.print(ans);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    int N = sc.nextInt();
    int D = sc.nextInt();
    int ans = 0;
    for(int i=0;i<N;i++){
      int p = sc.nextInt();
      int q = sc.nextInt();
      double dist = Math.sqrt(Math.pow(p,2)+Math.pow(q,2));
      if(dist<=D) ans++;
    }
    
    System.out.print(ans);
  }
}