## Coordinate Compression: Range Sum

Suppose there is an infinite number line, and the number on each coordinate on the number line is 0.

Now we first proceed n operations, each operation will be add c on a certain position x.

Next, proceed m queries, each query contains two integers l with r, You need to find for the interval [l, r], the sum of all the numbers between index l and index r.

Input format The first line contains two integers n with m.

Next n rows, each row contains two integers x and c.

Next m rows, each row contains two integers l and r.

Output format Total m Line, each line outputs the sum of the numbers in the interval sought in the query.

data range −109≤ x≤109, 1 ≤ n , m ≤105, −109≤ l≤ r≤109, − 10000 ≤ c ≤ 10000

Sample Input:

3 3
1 2
3 6
7 5
1 3
4 6
7 8


Sample Output:

8
0
5