luogu#P7865. 「EVOI-RD1」无人机航拍
「EVOI-RD1」无人机航拍
Background
City T is holding an event and needs aerial overview photos. A drone fleet was invited to do the filming. 一E孤行 is the captain of the team, and he arranges the drones’ positions based on the size of the square.
Problem Description
There is a square, which can be seen as an rectangle. 一E孤行 has a total of drones. The shooting area of each drone can also be seen as a rectangle, and the shooting area of the whole drone fleet is the union of all drones’ shooting areas.
一E孤行 is responsible for arranging the drones’ positions, and the overall person in charge, WuuTue, will check her his plan. WuuTue’s checking method is to list important regions, and each important region is also a rectangle. How good 一E孤行’s plan is depends on how many important regions are completely inside the drone fleet’s shooting area.
Therefore, for each important region, 一E孤行 wants to know whether it is completely inside the drone fleet’s shooting area.
Input Format
The first line contains two integers and separated by spaces, describing the size of the square.
The second line contains one integer , the total number of drones in the fleet.
Lines to each contain four integers separated by spaces, describing the shooting area of one drone. Here are the coordinates of the lower-left corner of the rectangle, and are the coordinates of the upper-right corner.
Line contains one integer , the number of important regions listed by the overall person in charge.
The last lines each contain four integers separated by spaces, describing one important region. Here are the coordinates of the lower-left corner of the rectangle, and are the coordinates of the upper-right corner.
Output Format
Output lines. For each important region, output Yes if it is completely within the fleet’s shooting area; otherwise output No. Each answer should be on its own line.
9 9
3
2 1 4 4
2 5 4 9
5 2 7 6
2
3 3 6 6
5 6 8 8
Yes
No
Hint
Sample Explanation
As shown in the figure below, regions are the areas covered by the drones arranged by someone, and regions are the key regions listed by WuuTue during checking. Region can be fully covered, while region cannot be fully covered.

Constraints and Notes
This problem uses bundled tests.
For of the testdata: , 。
For of the testdata:
- 。
- 。
- 。
- 。
- 。
- 。
Translated by ChatGPT 5