#P1184C2. Heidi and the Turing Test (Medium)
Heidi and the Turing Test (Medium)
Description
The Cybermen solved that first test much quicker than the Daleks. Luckily for us, the Daleks were angry (shocking!) and they destroyed some of the Cybermen.
After the fighting stopped, Heidi gave them another task to waste their time on.
There are points on a plane. Given a radius , find the maximum number of points that can be covered by an -ball with radius .
An -ball with radius and center in a 2D-plane is defined as the set of points such that the Manhattan distance between and is at most .
Manhattan distance between and is defined as .
The first line contains two integers (), the number of points and the radius of the ball, respectively.
Each of the next lines contains integers (), describing the coordinates of the -th point.
It is guaranteed, that all points are distinct.
Print one integer — the maximum number points that an -ball with radius can cover.
Input
The first line contains two integers (), the number of points and the radius of the ball, respectively.
Each of the next lines contains integers (), describing the coordinates of the -th point.
It is guaranteed, that all points are distinct.
Output
Print one integer — the maximum number points that an -ball with radius can cover.
Note
In the first example, a ball centered at covers the points , , .
In the second example, a ball centered at covers all the points.
Note that and need not be integer.