import java.util.Scanner;

public class Main {

    public static final int MOD = 1000000007;

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

    public static final int MOD = 1000000007;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        long d = Long.parseLong(sc.next());
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            long x = Long.parseLong(sc.next());
            long y = Long.parseLong(sc.next());
            if (x * x + y * y <= d * d) {
                cnt++;
            }
        }
        System.out.println(cnt);
    }
} Main public static final int MOD = 1000000007; MOD 1000000007 public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        long d = Long.parseLong(sc.next());
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            long x = Long.parseLong(sc.next());
            long y = Long.parseLong(sc.next());
            if (x * x + y * y <= d * d) {
                cnt++;
            }
        }
        System.out.println(cnt);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        long d = Long.parseLong(sc.next());
        int cnt = 0;
        for (int i = 0; i < n; i++) {
            long x = Long.parseLong(sc.next());
            long y = Long.parseLong(sc.next());
            if (x * x + y * y <= d * d) {
                cnt++;
            }
        }
        System.out.println(cnt);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc long d = Long.parseLong(sc.next()); d Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc int cnt = 0; cnt 0 for (int i = 0; i < n; i++) {
            long x = Long.parseLong(sc.next());
            long y = Long.parseLong(sc.next());
            if (x * x + y * y <= d * d) {
                cnt++;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            long x = Long.parseLong(sc.next());
            long y = Long.parseLong(sc.next());
            if (x * x + y * y <= d * d) {
                cnt++;
            }
        } {
            long x = Long.parseLong(sc.next());
            long y = Long.parseLong(sc.next());
            if (x * x + y * y <= d * d) {
                cnt++;
            }
        } long x = Long.parseLong(sc.next()); x Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc long y = Long.parseLong(sc.next()); y Long.parseLong(sc.next()) Long.parseLong Long sc.next() sc.next sc if (x * x + y * y <= d * d) {
                cnt++;
            } x * x + y * y <= d * d x * x + y * y x * x x x y * y y y d * d d d {
                cnt++;
            } cnt++ cnt System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args public class Main {

    public static final int MOD = 1000000007;

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

    public static final int MOD = 1000000007;

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

public class Main {

    public static final int MOD = 1000000007;

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