import java.util.*;
class Main{
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]){
        int N=sc.nextInt();
        long D=sc.nextLong();
        D *= D;
        HashMap<pair,Integer> p = new HashMap<>();
        for(int i=0;i<N;i++){
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        }
        System.out.println(p.size());
    }
}
class pair {
    long a;
    long b;
    public pair(long a,long b){
        this.a=a;
        this.b=b;
    }
    public pair(){}
} import java.util.*; util.* java class Main{
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]){
        int N=sc.nextInt();
        long D=sc.nextLong();
        D *= D;
        HashMap<pair,Integer> p = new HashMap<>();
        for(int i=0;i<N;i++){
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        }
        System.out.println(p.size());
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String args[]){
        int N=sc.nextInt();
        long D=sc.nextLong();
        D *= D;
        HashMap<pair,Integer> p = new HashMap<>();
        for(int i=0;i<N;i++){
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        }
        System.out.println(p.size());
    } main {
        int N=sc.nextInt();
        long D=sc.nextLong();
        D *= D;
        HashMap<pair,Integer> p = new HashMap<>();
        for(int i=0;i<N;i++){
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        }
        System.out.println(p.size());
    } int N=sc.nextInt(); N sc.nextInt() sc.nextInt sc long D=sc.nextLong(); D sc.nextLong() sc.nextLong sc D *= D D D HashMap<pair,Integer> p = new HashMap<>(); p new HashMap<>() for(int i=0;i<N;i++){
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        } {
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        } long x=sc.nextInt() x sc.nextInt() sc.nextInt sc y=sc.nextInt(); y sc.nextInt() sc.nextInt sc pair t = new pair(x,y); t new pair(x,y) x *= x x x y *= y y y if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            } (!p.containsKey(t))&&(D>=x+y) (!p.containsKey(t)) p.containsKey(t) p.containsKey p t (D>=x+y) D x+y x y {
                p.put(t,1);
            } p.put(t,1) p.put p t 1 System.out.println(p.size()) System.out.println System.out System System.out p.size() p.size p String args[] args class pair {
    long a;
    long b;
    public pair(long a,long b){
        this.a=a;
        this.b=b;
    }
    public pair(){}
} pair long a; a long b; b public pair(long a,long b){
        this.a=a;
        this.b=b;
    } pair {
        this.a=a;
        this.b=b;
    } this.a=a this.a this this.a a this.b=b this.b this this.b b long a a long b b public pair(){} pair {}
import java.util.*;
class Main{
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]){
        int N=sc.nextInt();
        long D=sc.nextLong();
        D *= D;
        HashMap<pair,Integer> p = new HashMap<>();
        for(int i=0;i<N;i++){
            long x=sc.nextInt(),y=sc.nextInt();
            pair t = new pair(x,y);
            x *= x;
            y *= y;
            if((!p.containsKey(t))&&(D>=x+y)){
                p.put(t,1);
            }
        }
        System.out.println(p.size());
    }
}
class pair {
    long a;
    long b;
    public pair(long a,long b){
        this.a=a;
        this.b=b;
    }
    public pair(){}
}