WiFi Access

Wifi Internet connection has become such a part and parcel of our live nowadays that it seems to be one of the first questions when a tech-aware guy goes to a new place that, there is a wifi network available here. We are here to asses such a scenario here. In an area, there are n Wifi routers. Each router is located at a fixed position with their co-ordinates given on a 2D cartesian plane. A router covers a circular area of radius r centered at its position. If someone with a Wifi enabled gadget enters in this area (including the center and periphery), they will be able to connect to that particular router. So, in order to be under Wifi coverage, one needs to be within the circular coverage area of any Wifi router present in that scenario. You can assume that the networks are not password protected and if an area is under coverage of multiple routers, there’s no issue related to interference. Now, given your locations in a particular area, you need to determine if you are under Wifi coverage or not. Input The input begins with a number T (1 ≤ T ≤ 100), the number of test cases. Each case starts with 2 integers, n (1 ≤ n ≤ 100), denoting the number of routers in that case and y (1 ≤ y ≤ 10), the number of different locations from where you are trying to access the Wifi network (possibly on different moments in time). It may be noteworthy that, multiple routers can be present at the same location. Each of the next n lines contains 3 integers, rx (−1000 ≤ rx ≤ 1000), the x-coordinate of the router, ry (−1000 ≤ ry ≤ 1000), the y-coordinate of the router and r (1 ≤ r ≤ 1000), radius of the coverage area for this router. This is followed by y lines with 2 integers each, yx (−1000 ≤ yx ≤ 1000) and yy (−1000 ≤ yy ≤ 1000), a pair of x, y coordinate values denoting your location. Output Each test case begins with a line of the form ‘Case X:’, where X is the number of test case. This is followed by y lines, one for each pair of yx, yy value in that input case. A particular line will contain ‘Yes’ if you are under Wifi Coverage for that location and ‘No’ otherwise. Sample Input 1 13 002 00 02 03 Sample Output Case 1: Yes Yes No