Slalom

Time limit1sMemory limit128 MB

Problem

You are competing in a ski slalom and need to choose the best pair of skis for the race. The course consists of $N$ pairs of gates. Each pair has a left gate and a right gate, with the right gate exactly $W$ metres to the right of the corresponding left gate; you may never pass to the left of a left gate nor to the right of a right gate. The $i$-th pair of gates lies at vertical distance $y_i$ down the hill, and the horizontal position of its left gate is $x_i$ (so its right gate is at $x_i + W$). Every gate is farther down the hill than the previous one, i.e. $y_i < y_{i+1}$ for all $i$.

You may pick one of $S$ pairs of skis; the $j$-th pair has speed $s_j$. If you use the skis with speed $s_j$, you descend at a constant vertical velocity of $s_j$ metres per second. Separately, at any moment you may move horizontally at a speed of at most $v_h$ metres per second. You may start and finish at any horizontal positions.

Determine which pair of skis lets you complete the course, passing through every gate, in the shortest time.

Input

The first line contains three integers $W$, $v_h$, and $N$, separated by spaces, with $1 \le W \le 10^8$, $1 \le v_h \le 10^6$, and $1 \le N \le 10^5$.

Each of the next $N$ lines contains two integers $x_i$ and $y_i$: the horizontal and vertical positions of the $i$-th left gate, with $1 \le x_i, y_i \le 10^8$.

The next line contains an integer $S$, the number of ski pairs, with $1 \le S \le 10^6$.

Each of the next $S$ lines contains one integer $s_j$, the speed of the $j$-th pair of skis, with $1 \le s_j \le 10^6$.

Output

If no pair of skis can complete the course, print IMPOSSIBLE. Otherwise, print the vertical speed $s_j$ of the pair of skis that completes the course in the shortest time.