import java.util.*;

public class  Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int d = sc.nextInt();
	long[] x = new long[n * 2];
	for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    }
    int count = 0;
    for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    }
    System.out.println(count);
	sc.close();
	}
} import java.util.*; util.* java public class  Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int d = sc.nextInt();
	long[] x = new long[n * 2];
	for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    }
    int count = 0;
    for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    }
    System.out.println(count);
	sc.close();
	}
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int d = sc.nextInt();
	long[] x = new long[n * 2];
	for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    }
    int count = 0;
    for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    }
    System.out.println(count);
	sc.close();
	} main {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int d = sc.nextInt();
	long[] x = new long[n * 2];
	for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    }
    int count = 0;
    for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    }
    System.out.println(count);
	sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int d = sc.nextInt(); d sc.nextInt() sc.nextInt sc long[] x = new long[n * 2]; x new long[n * 2] n * 2 n 2 for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    } int i = 0; int i = 0; i 0 i < n * 2 i n * 2 n 2 i++ i++ i {
		x[i] = sc.nextInt();
    } {
		x[i] = sc.nextInt();
    } x[i] = sc.nextInt() x[i] x i sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    } int j = 0; int j = 0; j 0 j < n * 2 j n * 2 n 2 j += 2 j += 2 j 2 {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    } {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    } if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        } d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1])) d Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1])) Math.sqrt Math (x[j] * x[j]) + (x[j + 1] * x[j + 1]) (x[j] * x[j]) x[j] x j x[j] x j (x[j + 1] * x[j + 1]) x[j + 1] x j + 1 j 1 x[j + 1] x j + 1 j 1 {
        count++;
        } count++ count System.out.println(count) System.out.println System.out System System.out count sc.close() sc.close sc String[] args args public class  Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int d = sc.nextInt();
	long[] x = new long[n * 2];
	for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    }
    int count = 0;
    for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    }
    System.out.println(count);
	sc.close();
	}
} public class  Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int d = sc.nextInt();
	long[] x = new long[n * 2];
	for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    }
    int count = 0;
    for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    }
    System.out.println(count);
	sc.close();
	}
} Main
import java.util.*;

public class  Main {
	public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);
	int n = sc.nextInt();
	int d = sc.nextInt();
	long[] x = new long[n * 2];
	for(int i = 0; i < n * 2; i++) {
		x[i] = sc.nextInt();
    }
    int count = 0;
    for(int j = 0; j < n * 2; j += 2) {
        if(d >= Math.sqrt((x[j] * x[j]) + (x[j + 1] * x[j + 1]))){
        count++;
        }
    }
    System.out.println(count);
	sc.close();
	}
}