import java.util.*;

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

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