I. Nested Circles
time limit per test
3 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Since coach Attal loves geometry problems, he tried to make an interesting problem to discuss it with DCPC community coaches. After discussing it, they came up with a simple solution. So they will tell you the problem.

You are given $$$n$$$ circles numbered from $$$1$$$ to $$$n$$$. Each circle is defined by an integer center $$$(x_i, y_i)$$$ and an integer radius $$$r_i$$$.

Then we will ask you $$$q$$$ questions. In each question, we will give you an integer point $$$(x_i, y_i)$$$, and you have to find the number of circles that cover this point.

Input

The first line contains the number of test cases $$$t$$$ $$$( 1 \le t \le 10^{5} )$$$. A description of the test cases follows.

The first line of each test case contains two integers $$$n, q$$$ $$$( 1 \le n, q \le 10^{5} )$$$ — the number of circles, the number of questions, respectively.

Each of the next $$$n$$$ lines contains three integers $$$x_i, y_i, r_i$$$ $$$( 1 \le x_i, y_i \le 10^{5}), ( 1 \le r_i \le 10)$$$ — the center and the radius of the $$$i$$$-th circle.

Each of the next $$$q$$$ lines contains two integers $$$x_i, y_i$$$ $$$( 1 \le x_i, y_i \le 10^{5})$$$ — the point of the $$$i$$$-th question.

It is guaranteed that the sum of $$$q$$$ and $$$n$$$ over all test cases does not exceed $$$10^{5}$$$.

Output

For each question $$$i$$$, print the number of circles that cover the point in the $$$i$$$-th question.

Example
Input
2
3 3
1 1 1
2 2 1
3 3 1
1 1
2 2
3 3
3 5
1 2 3
2 3 2
3 4 1
1 1
4 5
8 10
4 3
3 2
Output
1
1
1
1
0
0
1
2