The array with integers is given. Write a program that answers the question: find the minimum on a segment between and inclusively.
The first line contains three positive integers and — 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 and — the first query.
The elements are given with the next formula:
For example, if , we get the next array:
The queries are generated this way:
where is the answer to the -th query.
Print and (the values for the last query and the answer to it).