ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

1010. Discrete Function

Time limit: 1.0 second
Memory limit: 64 MB
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.

Input

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

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.

Sample

inputoutput
3
2
6
4
1 2
Problem Source: Third Open USTU Collegiate Programming Contest (PhysTech Cup), March 18, 2000