The first line contains three integers $n , m, q$ $(1 \le n \le 10^{6}, 1 \le m \le 10^{9}, 1 \le q \le 10^{6})$, indicating the number of lanes, the length of lanes and the number of questions, respectively.
The second line contains $n$ integers $x_1, x_2, \ldots, x_n$ $(1 \le x_{i} \le 10^{9})$, indicating the speed of each swimmer.
Each of the following $q$ lines contains two integers $p_i, k_i$ $(0 \le p_i \le 10^{9}, 1 \le k_i \le n)$ representing the $i$-th question.