import java.util.*;

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

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