There is a discrete function. It is specified for integer arguments from 1 to N. Each value of the function is from −231 to
231−1. You have to find such two points of the function for which all points between them are strictly below than straight line connecting them and inclination of this straight line is the largest.
There is an integer N in the first line (2 ≤ N ≤ 100000). Than N lines follow with the values of the function for the arguments 1, 2, …, N respectively.
Output a pair of integers, which are abscissas of the desired points. The first number must be less than the second one. If it is any ambiguity output the pair with the smallest first number.
Problem Source: Third Open USTU Collegiate Programming Contest (PhysTech Cup), March 18, 2000