The array with n integers is given. Write a program that answers the question: find the minimum on a segment between u and v inclusively.
The first line contains three positive integers n,m (1≤n≤105,m≤107) and a1 (1≤a1<16714589) — the number of elements in array, the number of queries and the first element in an array respectively. The second line contains two positive integers u1 and v1 (1≤u1,v1≤n) — the first query.
The elements a2,a3,...,an are given with the next formula:
For example, if n=10,a1=12345, we get the next array:
The queries are generated this way:
where ansi is the answer to the i-th query.
Print um,vm and ansm (the values for the last query and the answer to it).