P7865 "EVOI-RD1" Drone Aerial Photography.
Background
City T is holding an event and needs aerial overview photos. A drone fleet was invited to do the filming. [一E孤行](https://www.luogu.com.cn/user/229919) is the captain of the team, and he arranges the drones’ positions based on the size of the square.
Description
There is a square, which can be seen as an $n \times m$ rectangle. 一E孤行 has a total of $s$ 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 $L$ 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 $n$ and $m$ separated by spaces, describing the size of the square.
The second line contains one integer $s$, the total number of drones in the fleet.
Lines $3$ to $s+2$ each contain four integers $a_1,b_1,a_2,b_2$ separated by spaces, describing the shooting area of one drone. Here $a_1,b_1$ are the coordinates of the lower-left corner of the rectangle, and $a_2,b_2$ are the coordinates of the upper-right corner.
Line $s+3$ contains one integer $L$, the number of important regions listed by the overall person in charge.
The last $L$ lines each contain four integers $r_1,c_1,r_2,c_2$ separated by spaces, describing one important region. Here $r_1,c_1$ are the coordinates of the lower-left corner of the rectangle, and $r_2,c_2$ are the coordinates of the upper-right corner.
Output Format
Output $L$ 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.
Explanation/Hint
**Sample Explanation**
As shown in the figure below, regions $A,B,C$ are the areas covered by the drones arranged by someone, and regions $D,E$ are the key regions listed by WuuTue during checking. Region $D$ can be fully covered, while region $E$ cannot be fully covered.

**Constraints and Notes**
**This problem uses bundled tests.**
For $40\%$ of the testdata: $1 \le n \le 1000$, $1 \le s \le 100$。
For $100\%$ of the testdata:
- $1 \le n, m \le 3 \times 10^{3}$。
- $1 \le s,L \le 10^6$。
- $1 \le x_1 < x_2 \le n$。
- $1 \le r_1 < r_2 \le n$。
- $1 \le y_1 < y_2 \le m$。
- $1 \le c_1 < c_2 \le m$。
Translated by ChatGPT 5