There are segments on a plane. Each segment starts on the non-negative part of the -axis and ends on the non-negative part of the -axis. In other words, its starting point has coordinates with , and its ending point has coordinates with .
You are given queries. In each query, a segment is specified whose starting point lies on the -axis, and whose ending point can be anywhere in the first quadrant or the non-negative parts of the axes of the plane. For each query segment, determine whether it intersects with any of the existing segments. Intersections at endpoints are counted.
Queries are independent of each other; that is, the segment given in each query will not be kept in the remaining queries.
输入格式
The input contains multiple testcases. The first line of the input contains an integer (), the number of testcases.
For each test case, the first line contains two integers (), the number of existing segments and the number of queries.
Each of the next lines contains two integers (), describing a segment that starts at and ends at .
Then, each of the following lines contains three integers (), describing a query segment that starts at and ends at .
It’s guaranteed that the sum of and the sum of over all testcases does not exceed , respectively.
输出格式
For each query, print YES if the query segment intersects (including at endpoints) with at least one of the existing segments, and NO otherwise.