C. Frosting Circles
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Polycarp is baking a cupcake and first bakes the bread, which can be represented as a solid circle centered at $$$(0, 0)$$$ with radius $$$R\ (1\leq R\leq 50).$$$ Polycarp also puts down $$$N$$$ $$$(1\leq N\leq 50)$$$ solid circles of frosting, with the $$$i$$$th one having radius $$$r_i\ (1\leq r_i\leq 50)$$$ and centered at $$$(x_i, y_i)$$$ $$$(-50\leq x_i, y_i\leq 50)$$$.

Polycarp wants to know how many integer points of the cupcake bread are covered by least one of the circles of frosting. Can you help Polycarp?

Input

The first line contains $$$N, R$$$ in that order.

The next $$$N$$$ lines will contain $$$r_i, x_i, y_i$$$ on the $$$i$$$-th line.

Output

Print the answer as an integer.

Example
Input
2 3
2 -1 -1
1 0 2
Output
16
Note

The green circle is the cupcake bread. The other two circles are the frostings. If we count the number of integer points of the green circle that also lie in a frosting circle, we have 11 points in the red circle and 5 in the blue circle.