An array of integers is given. Write a program that answers queries of the following form: find the minimum value in the segment from to , inclusive.
The first line contains three integers: n, m~(1 \le n \le 10^5, m \le 10^7), and a_1~(1 \le a_1 < 16714589) — the number of elements in the array, the number of queries, and the first element of the array, respectively.
The second line contains two integers u_1 and v_1~(1 \le u_1, v_1 \le n), describing the first query.
The elements a_2, a_3, \ldots, a_n are defined by the following formula:
For example, if n = 10 and a_1 = 12345, the array will be:
The queries are generated as follows:
Here, ans_i denotes the answer to the -th query.
Print u_m, v_m, and ans_m — the parameters of the last query and its answer.
Example 1