unittest
{
	assert( [ "4 5", "0 5", "-2 4", "3 4", "4 -4" ].solve == 3 );
	assert( [ "12 3", "1 1", "1 1", "1 1", "1 1", "1 2", "1 3", "2 1", "2 2", "2 3", "3 1", "3 2", "3 3" ].solve == 7 );
	assert( [ "20 100000", "14309 -32939", "-56855 100340", "151364 25430", "103789 -113141", "147404 -136977", "-37006 -30929", "188810 -49557", "13419 70401", "-88280 165170", "-196399 137941", "-176527 -61904", "46659 115261", "-153551 114185", "98784 -6820", "94111 -86268", "-30401 61477", "-55056 7872", "5901 -163796", "138819 -185986", "-69848 -96669" ].solve == 6 );
}



import std.conv;
import std.format;
import std.math;
import std.range;
import std.stdio;

void main()
{
	stdin.byLineCopy.solve.writeln;
}

auto solve( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = 0L;
	auto d = 0L;
	input.front.formattedRead!"%s %s"( n, d );
	auto xys = new long[ 2 ][ n ];
	foreach( ref xy; xys )
	{
		input.popFront;
		xy = input.front.split.to!( long[] );
	}
	
	auto ans = 0L;
	foreach( xy; xys )
	{
		if( hypot( xy[ 0 ], xy[ 1 ] ) <= d ) ans++;
	}
	return ans;
}
