General Zhang recently got a plasma shield to intercept incoming missiles.
The shape of the plasma shield is basically a square with a horizontal diagonal. Due to some technology issues, the plasma shield cannot protect the whole square area. One vertical stripe in the middle of the square is penetrable to the missiles. So, in fact the shield is formed by two identical isosceles right triangle. Missiles hitting the surface or the edge of the shield are considered intercepted.
Now $N$ missiles are coming to General Zhang’s army. The $i-th$ missile will strike the position $(x_i,y_i)$. Because he only has one plasma shield, he want to calculate when the shield is turned on in a particular way, how many of the missiles it can stop.
General Zhang will give you $M$ queries, each query describe the shape of a plasma by 4 integers $(X,Y,D,W)$. $(X,Y)$ denotes the center of the shield. $D$ denotes the length of the diagonal. $W$ denotes the width of the unprotected stripe. For each query, you need to output number of the missiles stopped by the shield.