There are n gas stations on a highway, the i-th station is located at the xi km of the highway, and you can get vi unit of fuel (an unit of fuel can drive 1 km) if you stop and refuel at this station. Also, you can't stop at the i+1, i+2, ..., n-th station if you don't stop at the i-th station.
Now you are at the 0 km of the highway and your car has V unit of fuel. Besides, there are q places you want to visit, the i-th place is located at the pi km of the highway. Now, for each place, answer at least how many gas station you need to stop in order to reach the place.
Let Ti be the total unit of fuel you will have if you stop at 1, 2, ... i-th station. Then Ti = V + v1 + v2 + ... + vi by definition, which can be computed in O(n) time using the following recurrence:
The first line contains two integers: n, q, V.
For the next n lines, each line contains two integers: xi, vi (i = 1, 2, ..., n).
The last line contains q integers: p1, p2, ..., pn.
Output n lines, each line contains one integer: the answer of the i-th place. If it is impossible to reach the place, output -1.