The first line contains a single integer T (1≤T≤100), the number of test cases. For each test case:
The first line of the input contains two integers n and q (1≤n,q≤50,000), denoting the number of noblesse code pairs and the number of queries.
In the next n lines, the i-th line contains two integers ai and bi (1≤ai,bi≤1e18), describing the i-th noblesse code pair.
In the next q lines, the i-th line contains two integers A and B (1≤A,B≤1e18), describing the pair in the i-th query.
It is guaranteed that the sum of all n is at most 500,000500,000, and the sum of all q is at most 500,000
2
3 4
6 9
5 3
1 1
6 3
1 2
2 1
5 3
2 2
7 14
7 14
7 7
7 14
1
0
1
1
2
2