You are running an interval storage service. The storehouse currently contains $N$ intervals, where the $i$-th interval is represented as $[l_i, r_i]$ on the number line.
$Q$ upcoming laser strikes on the storehouse have been announced! The damage range of the $j$-th laser can be represented as the interval $[s_j, e_j]$. Each time a laser strike occurs, your job is to move the stored intervals such that no interval is hit by the laser.
Specifically, for each stored interval $[l_i, r_i]$, a suitable integer $x_{ij}$ is selected. Then, for all $(i, j)$, the length of the intersection between $[l_i+x_{ij}, r_i+x_{ij}]$ and $[s_j, e_j]$ must be $0$. Here, the length of the intersection between two intervals $[a, b]$ and $[c, d]$ is defined as $\max(0, \min(b, d) - \max(a, c))$.
Intervals are heavy and require special machines when moving them. Moving an interval costs an amount of (Distance moved) $\times$ (Length of interval) in electricity bills. Thus, the fee to be paid before the $j$-th laser beam strikes is $\sum_{i=1}^{N} (r_i-l_i)|x_{ij}|$.
Note that all intervals are moved back to their initial position after each laser strike, and this also costs electricity.
Your task is to pay the minimum amount in electricity bills while keeping all stored intervals safe. Calculate the cost required to do so.
Input
The first line of input contains $N$, denoting the number of intervals, and $Q$, denoting the number of laser strikes. ($1 \le N, Q \le 250\,000$)
The $i$-th of the following $N$ lines contains $l_i$ and $r_i$, denoting the endpoints of the $i$-th interval. ($1 \le l_i < r_i \le 1\,000\,000$)
Then, the $j$-th of the following $Q$ lines contains $s_j$ and $e_j$, denoting the endpoints of the range damaged by the $j$-th laser strike. ($1 \le s_j < e_j \le 1\,000\,000$)
All input values are integers.
Output
Print $Q$ lines in total: the minimum amount to pay in electricity bills when moving all intervals to a safe position and back to the original state, for each laser strike in a single line.
Examples
Input 1
2 2 1 5 4 8 3 5 8 9
Output 1
24 0