The description of Nuclearia is read from the standard input. The first line contains two space-separated positive integers $W$ and $H$ (where $W·H ≤ 2500000$) which stand for the width and height of Nuclearia, respectively. The second line contains a positive integer $N$, which is the number of exploded plants $(1 ≤ N ≤ 200000)$. Each of the following $N$ lines contains four positive integers $x_i,y_i,a_i,b_i (1 ≤ x_i ≤ W, 1 ≤ y_i ≤ H, 1 ≤ a_i,b_i ≤ 10^9)$, which describe a plant in cell $[x_i,y_i]$ with parameters $a_i,b_i$. Each cell contains at most one plant.
The following line contains a positive integer $Q$, which is the number of queries $(1 ≤ Q ≤ 200000)$. Each of the following $Q$ lines contains four positive integers $x_{1j},y_{1j},x_{2j},y_{2j} (1 ≤ x_{1j} ≤ x_{2j} ≤ W$ and $1 ≤ y_{1j} ≤ y_{2j} ≤ H)$, which describe a query about the rectangle whose upper-left corner is the cell $[x_{1j},y_{1j}]$ and lower-right corner is the cell $[x_{2j},y_{2j}]$.
You can assume that the total radiation in Nuclearia is less than $2^{63}$.
