import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static int getInt(String a){
        return Integer.parseInt(a);
    }
    public static void main(String [] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = getInt(st.nextToken());
        long d = getInt(st.nextToken());
        int ans = 0;
        d *= d;

        while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        }
        bw.write(ans+"");

        bw.flush();
        bw.close();
        br.close();
    }
} import java.io.*; io.* java import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    public static int getInt(String a){
        return Integer.parseInt(a);
    }
    public static void main(String [] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = getInt(st.nextToken());
        long d = getInt(st.nextToken());
        int ans = 0;
        d *= d;

        while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        }
        bw.write(ans+"");

        bw.flush();
        bw.close();
        br.close();
    }
} Main public static int getInt(String a){
        return Integer.parseInt(a);
    } getInt {
        return Integer.parseInt(a);
    } return Integer.parseInt(a); Integer.parseInt(a) Integer.parseInt Integer a String a a public static void main(String [] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = getInt(st.nextToken());
        long d = getInt(st.nextToken());
        int ans = 0;
        d *= d;

        while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        }
        bw.write(ans+"");

        bw.flush();
        bw.close();
        br.close();
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = getInt(st.nextToken());
        long d = getInt(st.nextToken());
        int ans = 0;
        d *= d;

        while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        }
        bw.write(ans+"");

        bw.flush();
        bw.close();
        br.close();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) int n = getInt(st.nextToken()); n getInt(st.nextToken()) getInt st.nextToken() st.nextToken st long d = getInt(st.nextToken()); d getInt(st.nextToken()) getInt st.nextToken() st.nextToken st int ans = 0; ans 0 d *= d d d while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        } n-- != 0 n-- n 0 {
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) long x = getInt(st.nextToken()); x getInt(st.nextToken()) getInt st.nextToken() st.nextToken st long y = getInt(st.nextToken()); y getInt(st.nextToken()) getInt st.nextToken() st.nextToken st if(x*x + y*y <= d){
                ans +=1;
            } x*x + y*y <= d x*x + y*y x*x x x y*y y y d {
                ans +=1;
            } ans +=1 ans 1 bw.write(ans+"") bw.write bw ans+"" ans "" bw.flush() bw.flush bw bw.close() bw.close bw br.close() br.close br String [] args args public class Main {
    public static int getInt(String a){
        return Integer.parseInt(a);
    }
    public static void main(String [] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = getInt(st.nextToken());
        long d = getInt(st.nextToken());
        int ans = 0;
        d *= d;

        while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        }
        bw.write(ans+"");

        bw.flush();
        bw.close();
        br.close();
    }
} public class Main {
    public static int getInt(String a){
        return Integer.parseInt(a);
    }
    public static void main(String [] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = getInt(st.nextToken());
        long d = getInt(st.nextToken());
        int ans = 0;
        d *= d;

        while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        }
        bw.write(ans+"");

        bw.flush();
        bw.close();
        br.close();
    }
} Main
import java.io.*;
import java.util.StringTokenizer;

public class Main {
    public static int getInt(String a){
        return Integer.parseInt(a);
    }
    public static void main(String [] args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));

        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = getInt(st.nextToken());
        long d = getInt(st.nextToken());
        int ans = 0;
        d *= d;

        while(n-- != 0){
            st = new StringTokenizer(br.readLine());
            long x = getInt(st.nextToken());
            long y = getInt(st.nextToken());
            if(x*x + y*y <= d){
                ans +=1;
            }
        }
        bw.write(ans+"");

        bw.flush();
        bw.close();
        br.close();
    }
}
