import java.util.*;

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

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