#include <fstream>
#define INF 2147000000
using namespace std;
int v[10005],n,i,maxx=-INF,sec,st,dr;
int main()
{
ifstream f("secvcresc.in");
ofstream g("secvcresc.out");
f>>n;
f>>v[1];
sec=1;
for(i=2;i<=n;i++)
{
f>>v[i];
if(v[i]>v[i-1])
{
sec++;
if(sec>maxx) maxx=sec,st=i-maxx+1,dr=i;
} else sec=1;
}
g<<st<<" "<<dr;
f.close();
g.close();
return 0;
}