import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
//auto PS = new Tuple!(long,string)[](M);
//x[]=1;でlong[]全要素1に初期化
void main()
{
    long n, d;
    scan(n, d);
    long cnt;
    foreach (_; 0 .. n)
    {

        long x, y;
        scan(x, y);
        // writeln(x, y);
        float ans = (cast(float) x ^^ 2 + cast(float) y ^^ 2) ^^ 0.5;
        // writeln(ans);
        if (ans <= d)
        {
            cnt += 1;
        }
    }
    writeln(cnt);
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
