#include <iostream>
#include <vector>
#include <string>
#include <math.h>
#include <cstdio>
#include <algorithm>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <deque>
#include <cstring>
#define endl '\n'

using namespace std;
typedef long long ll;

int main(){
    ll n;
    cin >> n;
    
    vector<ll>a(n);
    
    for(int i = 0; i < n; i++)
        cin >> a[i];
    
    ll l = -1, r = -1;
    
    for(int i = 0; i < n - 1; i++)
        if(a[i] > a[i + 1] && l == -1)
            l = i;
        else if(a[i] > a[i + 1 ] && r == -1)
            r = i + 1;
    
    cout << 1 << endl;
    cout << l << ' ' << r << endl;
    
    
    

    return 0;
}
