#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string.h>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <list>
#include <time.h>
#include <ctime>
#include <ctype.h>
#include <iomanip>
#include <fstream>
#include <sstream>
typedef long long int ll;
typedef long long unsigned llu;
typedef long double ld;
#define f(i,n) for(ll i=0; i<n; i++)
#define fi(i,n) for(ll i=n-1; i>=0; i--)
#define cn cin>>
#define gt(s) getline(cin,s)
#define ct cout<<
#define sf scanf
#define pf printf
#define sc(n) scanf("%lld", &n)
#define dec(a) ll *a = new ll[n]
#define take(a) f(i,n) sf("%lld", &a[i])
#define ne <<endl
#define nl cout<<endl
#define spp <<' '<<
#define sp <<' '
#define _pb push_back
#define mp make_pair
#define md 1000000007
#define pi acos(-1)
#define d(a) delete [] a
using namespace std;

void io(bool done){
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
}

ll a[100010],n;
/*
int main(){
    io(true);
    sc(n); bool done1=false,done2=false;
    for(int i=1; i<=n; i++) sc(a[i]);
    if(n==1 or n==2) {ct 0; return 0;}
    int dir=0;
    for(int i=1; i<n; i++){
        if(a[i]>a[i+1]){
            done1=true;
            if(done2) break;
            dir=1;
        } else if(a[i]<a[i+1]){
            done2=true;
            if(done1) break;
            dir=2;
        }
    } if(dir==0 or !(done1 and done2)) { ct 0; return 0; }

    //ct "come here\n"; ct "dir=" spp dir spp "temp=" spp temp ne;

    if(dir==1){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]<a[temp]){
                temp=i;
                break;
            }
        } for(int i=temp+1; i<=n; i++){
            if(a[i]>a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } else if(dir==2){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]>a[temp]){
                temp=i;
                break;
            }
        } for(int i=temp+1; i<=n; i++){
            if(a[i]<a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } pf("0\n"); return 0;

}
*/

int main(){
    //io(true);
    sc(n); bool done1=false,done2=false;
    for(int i=1; i<=n; i++) sc(a[i]);
    if(n==1 or n==2) {ct 0; return 0;}
    int dir=0;
    for(int i=1; i<n; i++){
        if(a[i]>a[i+1]){
            done1=true;
            if(done2) break;
            dir=1;
        } else if(a[i]<a[i+1]){
            done2=true;
            if(done1) break;
            dir=2;
        }
    } if(dir==0 or !(done1 and done2)) { ct 0; return 0; }

    //ct "come here\n"; ct "dir=" spp dir spp "temp=" spp temp ne;

    if(dir==1){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]<a[temp]){
                temp=i;
            } else if(a[i]>a[temp]) break;
        } for(int i=temp+1; i<=n; i++){
            if(a[i]>a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } else if(dir==2){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]>a[temp]){
                temp=i;
            } else if(a[i]<a[temp]) break;
        } for(int i=temp+1; i<=n; i++){
            if(a[i]<a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } pf("0\n"); return 0;

}

/*
5
67 499 600 42 23
*/

/*
6
1 1 2 3 3 2
*/


#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string.h>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <list>
#include <time.h>
#include <ctime>
#include <ctype.h>
#include <iomanip>
#include <fstream>
#include <sstream>
typedef long long int ll;
typedef long long unsigned llu;
typedef long double ld;
#define f(i,n) for(ll i=0; i<n; i++)
#define fi(i,n) for(ll i=n-1; i>=0; i--)
#define cn cin>>
#define gt(s) getline(cin,s)
#define ct cout<<
#define sf scanf
#define pf printf
#define sc(n) scanf("%lld", &n)
#define dec(a) ll *a = new ll[n]
#define take(a) f(i,n) sf("%lld", &a[i])
#define ne <<endl
#define nl cout<<endl
#define spp <<' '<<
#define sp <<' '
#define _pb push_back
#define mp make_pair
#define md 1000000007
#define pi acos(-1)
#define d(a) delete [] a
using namespace std;

void io(bool done){
	freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
}

ll a[100010],n;

int main(){
    //io(true);
    sc(n); bool done1=false,done2=false;
    for(int i=1; i<=n; i++) sc(a[i]);
    if(n==1 or n==2) {ct 0; return 0;}
    int dir=0;
    for(int i=1; i<n; i++){
        if(a[i]>a[i+1]){
            done1=true;
            if(done2) break;
            dir=1;
        } else if(a[i]<a[i+1]){
            done2=true;
            if(done1) break;
            dir=2;
        }
    } if(dir==0 or !(done1 and done2)) { ct 0; return 0; }

    //ct "come here\n"; ct "dir=" spp dir spp "temp=" spp temp ne;

    if(dir==1){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]<a[temp]){
                temp=i;
                break;
            }
        } for(int i=temp+1; i<=n; i++){
            if(a[i]>a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } else if(dir==2){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]>a[temp]){
                temp=i;
                break;
            }
        } for(int i=temp+1; i<=n; i++){
            if(a[i]<a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } pf("0\n"); return 0;

}

/*
5
67 499 600 42 23
*/

/*
6
1 1 2 3 3 2
*/


#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string.h>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <list>
#include <time.h>
#include <ctime>
#include <ctype.h>
#include <iomanip>
#include <fstream>
#include <sstream>
typedef long long int ll;
typedef long long unsigned llu;
typedef long double ld;
#define f(i,n) for(ll i=0; i<n; i++)
#define fi(i,n) for(ll i=n-1; i>=0; i--)
#define cn cin>>
#define gt(s) getline(cin,s)
#define ct cout<<
#define sf scanf
#define pf printf
#define sc(n) scanf("%lld", &n)
#define dec(a) ll *a = new ll[n]
#define take(a) f(i,n) sf("%lld", &a[i])
#define ne <<endl
#define nl cout<<endl
#define spp <<' '<<
#define sp <<' '
#define _pb push_back
#define mp make_pair
#define md 1000000007
#define pi acos(-1)
#define d(a) delete [] a
using namespace std;

void io(bool done){
	freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
}

ll a[100010],n;

int main(){
    //io(true);
    sc(n); bool done1=false,done2=false;
    for(int i=1; i<=n; i++) sc(a[i]);
    if(n==1 or n==2) {ct 0; return 0;}
    int dir=0;
    for(int i=1; i<n; i++){
        if(a[i]>a[i+1]){
            done1=true;
            if(done2) break;
            dir=1;
        } else if(a[i]<a[i+1]){
            done2=true;
            if(done1) break;
            dir=2;
        }
    } if(dir==0 or !(done1 and done2)) { ct 0; return 0; }

    //ct "come here\n"; ct "dir=" spp dir spp "temp=" spp temp ne;

    if(dir==1){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]<a[temp]){
                temp=i;
                break;
            }
        } for(int i=temp+1; i<=n; i++){
            if(a[i]>a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } else if(dir==2){
        int temp=1;
        for(int i=2; i<=n; i++){
            if(a[i]>a[temp]){
                temp=i;
                break;
            }
        } for(int i=temp+1; i<=n; i++){
            if(a[i]<a[temp]){
                pf("%d\n%d %d ", 3,1,temp);
                pf("%d\n", i);
                return 0;
            }
        }
    } pf("0\n"); return 0;

}

/*
5
67 499 600 42 23
*/


#include <bits/stdc++.h>
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <cstdlib>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string.h>
#include <string>
#include <set>
#include <vector>
#include <map>
#include <stack>
#include <queue>
#include <list>
#include <time.h>
#include <ctime>
#include <ctype.h>
#include <iomanip>
#include <fstream>
#include <sstream>
typedef long long int ll;
typedef long long unsigned llu;
typedef long double ld;
#define f(i,n) for(ll i=0; i<n; i++)
#define fi(i,n) for(ll i=n-1; i>=0; i--)
#define cn cin>>
#define gt(s) getline(cin,s)
#define ct cout<<
#define sf scanf
#define pf printf
#define sc(n) scanf("%lld", &n)
#define dec(a) ll *a = new ll[n]
#define take(a) f(i,n) sf("%lld", &a[i])
#define ne <<endl
#define nl cout<<endl
#define spp <<' '<<
#define sp <<' '
#define _pb push_back
#define mp make_pair
#define md 1000000007
#define pi acos(-1)
#define d(a) delete [] a
using namespace std;

void io(bool done){
	freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
}

ll a[100010],n;

int main(){
    //io(true);
    sc(n); bool done1=false,done2=false;
    for(int i=1; i<=n; i++) sc(a[i]);
    if(n==1 or n==2) {ct 0; return 0;}
    int dir=0;
    for(int i=1; i<n; i++){
        if(a[i]>a[i+1]){
            done1=true;
            if(done2) break;
            dir=1;
        } else if(a[i]<a[i+1]){
            done2=true;
            if(done1) break;
            dir=2;
        }
    } if(dir==0 or !(done1 and done2)) { ct 0; return 0; }

    ll temp=a[2]; //ct "come here\n"; ct "dir=" spp dir spp "temp=" spp temp ne;

    if(dir==1){
        for(int i=3; i<=n; i++){
            if(a[i]>temp){
                pf("%d\n%d %d ", 3,1,2);
                pf("%d\n", i);
                return 0;
            }
        }
    } else if(dir==2){
        for(int i=3; i<=n; i++){
            if(a[i]<temp){
                pf("%d\n%d %d ", 3,1,2);
                pf("%d\n", i);
                return 0;
            }
        }
    } pf("0"); return 0;

}

/*
5
67 499 600 42 23
*/


/* sidchelseafan */
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define INF (ll)1e12
#define sz(a) (int)a.size()
#define pii pair<int,int>

//Hardware Instructions
#define bitcount __builtin_popcount
#define gcd __gcd

//Trasersal Macros
#define rep(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define dwn(i,n) for(int i=(n); --i>=0; )
#define repr(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define dwnr(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a) for(__typeof((a).begin()) i=(a).begin(), _##i=(a).end(); i!=_##i; ++i)
#define dwni(i,a) for(__typeof((a).rbegin()) i=(a).rbegin(), _##i=(a).rend(); i!=_##i; ++i)
#define all(a) a.begin(),a.end()
#define fill(a,s) memset(a,s,sizeof(a));
#define ff first
#define ss second
#define abs(x) (x<0?(-x):x)
#define EPS 1e-9

using namespace std;
const ll MX=100000;
const ll MOD = 1000000007;
const int inf = 222222222;
ll fast_exp(ll base,ll exp,ll mod){
  ll res=1;
  while(exp > 0){
    if (exp%2==1)res=(res*base)%mod;
    base = (base*base)%mod;
    exp/=2;
   }
  return res;
}
int arr[MX+5];
int main(){

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int n;cin>>n;
  rep(i,n) cin>>arr[i];

  if (n<2) {cout<<0;return 0;}
  int mx = -1000009;
  int mn = 1000009;
  int idx1,idx2;
  idx1=idx2=-1;
  rep(i,n){

    if ( mx>arr[i] && idx2<idx1 && idx1<i  ){
        cout<<3<<"\n";
        cout<<idx2+1<<" "<<idx1+1<<" "<<i+1<<"\n";
        return 0;
    }
   if (arr[i]>mn && idx1<idx2 && idx2<i){
    cout<<3<<"\n";
    cout<<idx1+1<<" "<<idx2+1<<" "<<i+1<<"\n";
    return 0;
   }

    if (arr[i]>mx){
        mx = arr[i];
        idx1 = i;
    }
    if (arr[i]<mn){
        mn = arr[i];
        idx2 = i;
    }
  }
  cout<<0;
  return 0;
}


/* sidchelseafan */
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define INF (ll)1e12
#define sz(a) (int)a.size()
#define pii pair<int,int>

//Hardware Instructions
#define bitcount __builtin_popcount
#define gcd __gcd

//Trasersal Macros
#define rep(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define dwn(i,n) for(int i=(n); --i>=0; )
#define repr(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define dwnr(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a) for(__typeof((a).begin()) i=(a).begin(), _##i=(a).end(); i!=_##i; ++i)
#define dwni(i,a) for(__typeof((a).rbegin()) i=(a).rbegin(), _##i=(a).rend(); i!=_##i; ++i)
#define all(a) a.begin(),a.end()
#define fill(a,s) memset(a,s,sizeof(a));
#define ff first
#define ss second
#define abs(x) (x<0?(-x):x)
#define EPS 1e-9

using namespace std;
const ll MX=100000;
const ll MOD = 1000000007;
const int inf = 222222222;
ll fast_exp(ll base,ll exp,ll mod){
  ll res=1;
  while(exp > 0){
    if (exp%2==1)res=(res*base)%mod;
    base = (base*base)%mod;
    exp/=2;
   }
  return res;
}
int arr[MX+5];
int arr1[MX+5];
int in[MX+5];
int main(){

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int n;cin>>n;
  rep(i,n) cin>>arr[i],arr1[i]=arr[i];

  if (n<2) {cout<<0;return 0;}
  bool inc,dec;
  inc=dec=true;
  sort(arr1,arr1+n);
  rep(i,n) inc = inc && (arr1[i]==arr[i]);
  if (inc) {cout<<"0";return 0;}
  reverse(arr1,arr1+n);
  rep(i,n) dec = dec && (arr1[i]==arr[i]);
  if (dec) {cout<<"0";return 0;}
  cout<<3<<"\n";

  int mx = -1000009;
  int mn = 1000009;
  int idx1,idx2;
  idx1=idx2=-1;
  rep(i,n){
    if (arr[i]>mx){
        mx = arr[i];
        idx1 = i;
    }
    if (arr[i]<mn){
        mn = arr[i];
        idx2 = i;
    }
  }

  if (idx1 < idx2){
    int ans = mx;
    int idx = -1;
    for (int i=0;i<idx1;i++){
        if (arr[i]<ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<idx+1<<" "<<idx1+1<<" "<<idx2+1;return 0;}
    ans = mn;
    for (int i=idx2+1;i<n;i++){
        if (arr[i]>ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
   if (idx!=-1) {cout<<idx1+1<<" "<<idx2+1<<" "<<idx+1;return 0;}
  }

  else{

    int ans = mn;
    int idx = -1;
    for (int i=0;i<idx2;i++){
        if (arr[i]>ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<idx+1<<" "<<idx2+1<<" "<<idx1+1;return 0;}
    ans = mx;
    for (int i=idx1+1;i<n;i++){
        if (arr[i]<ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<idx2+1<<" "<<idx1+1<<" "<<idx+1; return 0;}
  }

  return 0;
}


/* sidchelseafan */
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define INF (ll)1e12
#define sz(a) (int)a.size()
#define pii pair<int,int>

//Hardware Instructions
#define bitcount __builtin_popcount
#define gcd __gcd

//Trasersal Macros
#define rep(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define dwn(i,n) for(int i=(n); --i>=0; )
#define repr(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define dwnr(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a) for(__typeof((a).begin()) i=(a).begin(), _##i=(a).end(); i!=_##i; ++i)
#define dwni(i,a) for(__typeof((a).rbegin()) i=(a).rbegin(), _##i=(a).rend(); i!=_##i; ++i)
#define all(a) a.begin(),a.end()
#define fill(a,s) memset(a,s,sizeof(a));
#define ff first
#define ss second
#define abs(x) (x<0?(-x):x)
#define EPS 1e-9

using namespace std;
const ll MX=100000;
const ll MOD = 1000000007;
const int inf = 222222222;
ll fast_exp(ll base,ll exp,ll mod){
  ll res=1;
  while(exp > 0){
    if (exp%2==1)res=(res*base)%mod;
    base = (base*base)%mod;
    exp/=2;
   }
  return res;
}
int arr[MX+5];
int main(){

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int n;cin>>n;
  rep(i,n) cin>>arr[i];

  if (n<2) {cout<<0;return 0;}
  int mx = -1000009;
  int mn = 1000009;
  int idx1,idx2;
  idx1=idx2=-1;
  rep(i,n){
    if (arr[i]>mx){
        mx = arr[i];
        idx1 = i;
    }
    if (arr[i]<mn){
        mn = arr[i];
        idx2 = i;
    }
  }

  if (idx1 < idx2){
    int ans = mx;
    int idx = -1;
    for (int i=0;i<idx1;i++){
        if (arr[i]<ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<3<<"\n"<<idx+1<<" "<<idx1+1<<" "<<idx2+1;return 0;}
    ans = mn;
    for (int i=idx2+1;i<n;i++){
        if (arr[i]>ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
   if (idx!=-1) {cout<<3<<"\n"<<idx1+1<<" "<<idx2+1<<" "<<idx+1;return 0;}
  }

  else{

    int ans = mn;
    int idx = -1;
    for (int i=0;i<idx2;i++){
        if (arr[i]>ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<3<<"\n"<<idx+1<<" "<<idx2+1<<" "<<idx1+1;return 0;}
    ans = mx;
    for (int i=idx1+1;i<n;i++){
        if (arr[i]<ans){
            ans = arr[i];
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<3<<"\n"<<idx2+1<<" "<<idx1+1<<" "<<idx+1; return 0;}
  }
  cout<<0;
  return 0;
}


/* sidchelseafan */
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define INF (ll)1e12
#define sz(a) (int)a.size()
#define pii pair<int,int>

//Hardware Instructions
#define bitcount __builtin_popcount
#define gcd __gcd

//Trasersal Macros
#define rep(i,n) for(int i=0, _##i=(n); i<_##i; ++i)
#define dwn(i,n) for(int i=(n); --i>=0; )
#define repr(i,l,r) for(int i=(l), _##i=(r); i<_##i; ++i)
#define dwnr(i,l,r) for(int i=(r), _##i=(l); --i>=_##i; )
#define repi(i,a) for(__typeof((a).begin()) i=(a).begin(), _##i=(a).end(); i!=_##i; ++i)
#define dwni(i,a) for(__typeof((a).rbegin()) i=(a).rbegin(), _##i=(a).rend(); i!=_##i; ++i)
#define all(a) a.begin(),a.end()
#define fill(a,s) memset(a,s,sizeof(a));
#define ff first
#define ss second
#define abs(x) (x<0?(-x):x)
#define EPS 1e-9

using namespace std;
const ll MX=100000;
const ll MOD = 1000000007;
const int inf = 222222222;
ll fast_exp(ll base,ll exp,ll mod){
  ll res=1;
  while(exp > 0){
    if (exp%2==1)res=(res*base)%mod;
    base = (base*base)%mod;
    exp/=2;
   }
  return res;
}
int arr[MX+5];
int main(){

  ios_base::sync_with_stdio(false);
  cin.tie(NULL);

  int n;cin>>n;
  rep(i,n) cin>>arr[i];

  if (n<2) {cout<<0;return 0;}
  int mx = -1000009;
  int mn = 1000009;
  int idx1,idx2;
  idx1=idx2=-1;
  rep(i,n){
    if (arr[i]>mx){
        mx = arr[i];
        idx1 = i;
    }
    if (arr[i]<mn){
        mn = arr[i];
        idx2 = i;
    }
  }

  if (idx1 < idx2){
    int idx = -1;
    for (int i=0;i<idx1;i++){
        if (arr[i]<mx){
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<3<<"\n"<<idx+1<<" "<<idx1+1<<" "<<idx2+1;return 0;}
    for (int i=idx2+1;i<n;i++){
        if (arr[i]>mn){
            idx = i;
            break;
        }
    }
   if (idx!=-1) {cout<<3<<"\n"<<idx1+1<<" "<<idx2+1<<" "<<idx+1;return 0;}
  }

  else{

    int idx = -1;
    for (int i=0;i<idx2;i++){
        if (arr[i]>mn){
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<3<<"\n"<<idx+1<<" "<<idx2+1<<" "<<idx1+1;return 0;}

    for (int i=idx1+1;i<n;i++){
        if (arr[i]<mx){
            idx = i;
            break;
        }
    }
    if (idx!=-1) {cout<<3<<"\n"<<idx2+1<<" "<<idx1+1<<" "<<idx+1; return 0;}
  }
  cout<<0;
  return 0;
}


#include<algorithm>
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<stdio.h>
using namespace std;
#define lson k*2
#define rson k*2+1
#define M (t[k].l+t[k].r)/2
#define INF 1008611111
#define ll long long
#define eps 1e-15
int a[100005];
int main()
{
    int n,i,j,flag=0,tag,x;
    scanf("%d",&n);
    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    if(n<3)
    {
        printf("0\n");
        return 0;
    }
    i=1;
    while(a[0]==a[i]&&i<n)
        i++;
    int q,w;
    if(a[i]>a[0])
    {
        for(j=i+1;j<n;j++)
        {
            if(a[j]<a[j-1])
            {
                q=j;
                w=j+1;
                flag=1;
                break;
            }
        }
    }
    else
    {
        for(j=i+1;j<n;j++)
        {
            if(a[j]>a[j-1])
            {
                q=j;
                w=j+1;
                flag=1;
                break;
            }
        }
    }
    if(!flag)
        printf("0\n");
    else
    {
        printf("3\n");
        printf("%d %d %d\n",1,q,w);
    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long n,a[100010],m=0;
int main(){
cin>>n;
for(int i=0;i<n;i++)
cin>>a[i];
for(int i=0;i<n-1;i++)
if((a[i]-a[0])*(a[i+1]-a[i])<0){
cout<<3<<endl<<1<<" "<<i+1<<" "<<i+2<<endl;
return 0;}
//lllll
cout<<0;}


#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<math.h>
#include<algorithm>
#include<string>
#include<vector>
#include<set>
#include<map>
#define INF 1001
using namespace std;
inline int read()
{
	register int number_read=0,if_ok_read=1;
	char ch_read=getchar();
	while(ch_read<'0'||ch_read>'9')
	{
		if(ch_read=='-')
			if_ok_read=-1;
		ch_read=getchar();
	}
	while(ch_read>='0'&&ch_read<='9')
	{
		number_read=number_read*10+ch_read-'0';
		ch_read=getchar();
	}
	return number_read*if_ok_read;
}
inline void write(register int x_write)
{
    if(x_write<0)
	{
    	putchar('-');
		x_write=-x_write;
	}
    if(x_write>9)
		write(x_write/10);
    putchar(x_write%10+'0');
    return ;
}
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	int n=read(),a[INF]={0};
	for(int i=1;i<=n;i++)
		a[i]=read();
	for(int i=2;i<n;i++)
		if((a[i+1]>a[i]&&a[i]<a[1])||(a[i+1]<a[i]&&a[i]>a[1]))
		{
			printf("3\n1 %d %d\n",i,i+1);
			return 0;
		}
	write(0);
	putchar('\n');
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
long long n,a[100010],m=0;
int main(){
cin>>n;
for(int i=0;i<n;i++)
cin>>a[i];
for(int i=0;i<n-1;i++)
if((a[i]-a[0])*(a[i+1]-a[i])<0){
cout<<3<<endl<<1<<" "<<i+1<<" "<<i+2<<endl;
return 0;}
cout<<0;}


#include<stdio.h>
#include<stdlib.h>
int a[100005]={};
int main()
{
	int n;
	scanf("%d", &n);
	for(int i=1; i<=n; i++)
		scanf("%d", &a[i]);
	for(int i=2; i<n; i++){ //以a[1]为基准一步步往前寻找 如果有转折点一定能寻到
		if( (a[i]-a[1]) * (a[i+1]-a[i]) < 0 ){ //无序的经典判断
			printf("3\n1 %d %d\n", i, i+1);
			//system("pause");
			return 0;
		}
	}
	printf("0\n");
	//system("pause");
	return 0;
}


#include<bits/stdc++.h>
#define ll long long
using namespace std;
int n,a[100005];
int main()
{
	scanf("%lld",&n);
	for(int i=1;i<=n;i++)
	 scanf("%lld",&a[i]);
	for(int i=2;i<n;i++)
	 if(a[1]<a[i]&&a[i]>a[i+1]||a[1]>a[i]&&a[i]<a[i+1])
	  {
	  	printf("3\n1 %d %d",i,i+1);
	  	return 0;
	  }
	printf("0\n");
	return 0;
}


#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;

int a[2000000], n, ok;

int main()
{
	cin >> n;
	for (int i = 1; i <= n; ++i)
	{
		cin >> a[i];
	}
	for (int i = 2; !ok && i < n; ++i) {
		if ((a[i] - a[1]) * (a[i + 1] - a[i]) < 0) {
			ok = 1;
			printf("3\n1 %d %d", i, i + 1);
		}
	}
	if (!ok) printf("0");
	return 0;
}


#include <iostream>

using namespace std;

int n;
int a[100001];

int main(){
	while (cin >> n){
		for (int i = 1; i <= n; ++i)
			cin >> a[i];
	int p;
	int x, y, z;
	bool flg = 0;
	int k = 0;
	for (int i = 1; i < n; ++i){
		if (a[i] < a[i + 1]){
			x = i;
			p = i + 1;
			k = 1;
			break;
		}
	}
	if (k){
		for (int i = p; i < n; ++i){
			if (a[i] > a[i + 1]){
				y = i;
				z = i + 1;
				flg = 1;
				break;
			}
		}
	}
	if (!flg)
	{
		k = 0;
		for (int i = 1; i < n; ++i){
		if (a[i] > a[i + 1]){
			x = i;
			y = i + 1;
			p = i + 1;
			k = 1;
			break;
		}
	}
	if (k){
		for (int i = p; i < n; ++i){
			if (a[i] > a[i + 1]){
				z = i + 1;
				flg = 1;
				break;
			}
		}
	}
	}
	if (flg) cout << 3 << endl << x << " " << y << " " << z << endl;
	else cout << 0 << endl;
}
}


#include <iostream>
#include <cstdio>
#include <algorithm>
using namespace std;

struct node {
	int premax, premin, nextmax, nextmin;
} r[200000];
int a[2000000], n, ok;

int main()
{
	cin >> n;
	for (int i = 1; i <= n; ++i) cin >> a[i];
	a[n + 1] = -99999999;
	r[0].premax = r[n + 1].nextmax = n + 1;
	a[n + 2] = 99999999;
	r[0].premin = r[n + 1].nextmin = n + 2;
	for (int i = 1; i <= n; ++i)
	{
		if (a[i] > a[r[i - 1].premax]) {
			r[i].premax = i;
		} else r[i].premax = r[i - 1].premax;
		if (a[i] < a[r[i - 1].premin]) {
			r[i].premin = i;
		} else r[i].premin = r[i - 1].premin;
	}
	for (int i = n; i >= 1; --i)
	{
		if (a[i] > a[r[i + 1].nextmax]) {
			r[i].nextmax = i;
		} else r[i].nextmax = r[i + 1].nextmax;
		if (a[i] < a[r[i + 1].nextmin]) {
			r[i].nextmin = i;
		} else r[i].nextmin = r[i + 1].nextmin;
	}
	int ok = 0;
	for (int i = 2; !ok && i < n; ++i)
	{
		if (a[i] > a[r[i - 1].premin] && a[i] > a[r[i + 1].nextmin]) {
			ok = 1;
			printf("3\n%d %d %d\n", r[i - 1].premin, i, r[i + 1].nextmin);
		}
		else if (a[i] < a[r[i - 1].premax] && a[i] < a[r[i + 1].nextmax]) {
			ok = 1;
			printf("3\n%d %d %d\n", r[i - 1].premax, i, r[i + 1].nextmax);
		}
	}
	if (!ok) printf("0");
	return 0;
}


#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<string.h>
#include<cmath>
#include<algorithm>
#include<queue>
#include<stack>
using namespace std;
typedef unsigned long long ull;
typedef  long long ll;
#define INF  0x7f7f7f7f7f7f7f7f
#define M 2000002
#define N 300100
const ll mod = 100000007  ;
char s[N],ch;
ll a[N],n;
struct node{
	ll px,py,sx,sy;
}p[N];
int main(void){
	cin>>n;
	for(ll i = 1;i<= n;i++)
	cin>>a[i];
	a[n+2] =999999999;
	a[n+1] =-999999999;
	p[0].px =p[n+1].sx=n+2;
	p[0].py = p[n+1].sy=n+1;
	for(ll i = 1;i<=n;i++){
		p[i].py =max(i,p[i-1].py);
		p[i].px =min(i,p[i-1].px);
	}
	for(ll i = n;i>0;i--){
		p[i].sy =max(i,p[i+1].sy);
		p[i].sx =min(i,p[i+1].sx);
	}
	for(ll i = 2;i<n;i++){
		if(a[p[i-1].px]<a[i]&&a[i]>a[p[i+1].sx]){
			cout<<3<<endl<<p[i-1].px<<" "<<i<<" "<<p[i+1].sx<<endl;;
			return 0;
		}
		if(a[p[i-1].py] > a[i]&&a[i]<a[p[i+1].sy]){
			cout<<3<<endl<<p[i-1].py<<" "<<i<<" "<<p[i+1].sy<<endl;;
		}
	}
	cout<<0<<endl;
	return 0;

}


#include<bits/stdc++.h>
#include<iostream>
#include<cstdio>
#include<string.h>
#include<cmath>
#include<algorithm>
#include<queue>
#include<stack>
using namespace std;
typedef unsigned long long ull;
typedef  long long ll;
#define INF  0x7f7f7f7f7f7f7f7f
#define M 2000002
#define N 10100
const ll mod = 100000007  ;
char s[N],ch;
ll a[N],n;
struct node{
	ll px,py,sx,sy;
}p[N];
int main(void){
	cin>>n;
	for(ll i = 1;i<= n;i++)
	cin>>a[i];
	a[n+2]=9999999;
	a[n+1] =-9999999;
	p[0].px =p[n+1].sx=n+2;
	p[0].py = p[n+1].sy=n+1;
	for(ll i = 1;i<=n;i++){
		p[i].py =max(i,p[i-1].py);
		p[i].px =min(i,p[i-1].px);
	}
	for(ll i = n;i>0;i--){
		p[i].sy =max(i,p[i+1].sy);
		p[i].sx =min(i,p[i+1].sx);
	}
	for(ll i = 2;i<n;i++){
		if(a[p[i-1].px]<a[i]&&a[i]>a[p[i+1].sx]){
			cout<<3<<endl<<p[i-1].px<<" "<<i<<" "<<p[i+1].sx<<endl;;
			return 0;
		}
		if(a[p[i-1].py] > a[i]&&a[i]<a[p[i+1].sy]){
			cout<<3<<endl<<p[i-1].py<<" "<<i<<" "<<p[i+1].sy<<endl;;
		}
	}
	cout<<0<<endl;
	return 0;

}


#include<stdio.h>
#define it register int
#define il inline
const int N=1000005;
int maxn,minn,mxid,mnid,x,n,a[N];
il void fr(int &num){
    num=0;char c=getchar();int p=1;
    while(c<'0'||c>'9') c=='-'?p=-1,c=getchar():c=getchar();
    while(c>='0'&&c<='9') num=num*10+c-'0',c=getchar();
    num*=p;
}
int main(){
	fr(n);minn=0x7fffffff,maxn=-minn;
	if(n<3) return puts("0"),0;
	for(it i=1;i<=n;++i){
		fr(x),a[i]=x;
		if(x>maxn) maxn=x,mxid=i;
		if(x<minn) minn=x,mnid=i;
	}
	if((mxid==1&&mnid==n)||(mxid==n&&mnid==1)) return puts("0"),0;
	if(mxid<mnid){
		for(it i=1;i<=n;++i){
			if(a[i]<maxn&&i<mxid) return printf("3\n%d %d %d\n",i,mxid,mnid),0;
			if(a[i]<minn&&i>mnid) return printf("3\n%d %d %d\n",mxid,mnid,i),0;
		}
		return puts("0"),0;
	}
	for(it i=1;i<=n;++i){
		if(a[i]>minn&&i<mnid) return printf("3\n%d %d %d\n",i,mnid,mxid),0;
		if(a[i]<maxn&&i>mxid) return printf("3\n%d %d %d\n",mnid,mxid,i),0;
	}
	return puts("0"),0;
	return 0;
}
//思考一下 xxxx Min xxxx Max
//只要0点分割一下？？
//


#include<stdio.h>
#include<stdlib.h>
int a[100005]={};
int main()
{ //调了大半天 我哪错了 求HACK
	int n;
	scanf("%d", &n);
	for(int i=1; i<=n; i++)
		scanf("%d", &a[i]);
	for(int i=2; i<n; i++){ //以a[1]为基准一步步往前寻找 如果有转折点一定能寻到
		if( a[i]>a[1] && a[i]>a[i+1] || a[i]<a[1]&&a[i]<a[i+1] ){
			printf("3\n1 %d %d\n", i, i+1);
			//system("pause");
			return 0;
		}
	}
	printf("0\n");
	//system("pause");
	return 0;
}


//http://codeforces.com/contest/27/problem/D

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

int main()
{
	long long n;
	std::cin >> n;
	if (n < 3) {
		std::cout << "0";
		return 0;
	}

	std::vector<long> seq;
	std::vector<int> monotonicity;

	long long currentVal;
	std::cin >> currentVal;
	seq.push_back(currentVal);

	for (int i = 1; i < n; ++i) {
		std::cin >> currentVal;
		seq.push_back(currentVal);
		if (seq[i] == seq[i - 1]) monotonicity.push_back(0);
		if (seq[i] > seq[i - 1]) monotonicity.push_back(1);
		if (seq[i] < seq[i - 1]) monotonicity.push_back(-1);
	}

	std::vector<int> inc = { 1 };
	std::vector<int> dec = { -1 };
	auto resultUp = std::find_first_of(monotonicity.begin(), monotonicity.end(), inc.begin(), inc.end());
	auto resultDown = std::find_first_of(monotonicity.begin(), monotonicity.end(), dec.begin(), dec.end());

	if (resultUp != monotonicity.end() && resultDown != monotonicity.end()) {
		int indexUp = std::distance(monotonicity.begin(), resultUp) + 1;
		int indexDown = std::distance(monotonicity.begin(), resultDown) + 1;

		if (indexUp < indexDown) {
			std::cout << "3" << std::endl;
			std::cout << indexUp - 1 << " " << indexDown << " " << indexDown + 1;
		} else {
			std::cout << "3" << std::endl;
			std::cout << indexDown << " " << indexDown + 1 << " " << indexUp + 1;
		}
	} else {
		std::cout << "0";
	}

	return 0;
}


//http://codeforces.com/contest/27/problem/D

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

int main()
{
	long long n;
	std::cin >> n;
	if (n < 3) {
		std::cout << "0";
		return 0;
	}

	std::vector<long> seq;
	std::vector<int> monotonicity;

	long long currentVal;
	std::cin >> currentVal;
	seq.push_back(currentVal);

	for (int i = 1; i < n; ++i) {
		std::cin >> currentVal;
		seq.push_back(currentVal);
		if (seq[i] == seq[i - 1]) monotonicity.push_back(0);
		if (seq[i] > seq[i - 1]) monotonicity.push_back(1);
		if (seq[i] < seq[i - 1]) monotonicity.push_back(-1);
	}

	std::vector<int> inc = { 1 };
	std::vector<int> dec = { -1 };
	auto resultUp = std::find_first_of(monotonicity.begin(), monotonicity.end(), inc.begin(), inc.end());
	auto resultDown = std::find_first_of(monotonicity.begin(), monotonicity.end(), dec.begin(), dec.end());

	if (resultUp != monotonicity.end() && resultDown != monotonicity.end()) {
		int indexUp = std::distance(monotonicity.begin(), resultUp) + 1;
		int indexDown = std::distance(monotonicity.begin(), resultDown) + 1;

		if (indexUp < indexDown) {
			std::cout << "3" << std::endl;
			std::cout << indexUp - 1 << " " << indexDown << " " << indexDown + 1;
		} else {
			std::cout << "3" << std::endl;
			std::cout << indexDown - 1 << " " << indexDown << " " << indexUp;
		}
	} else {
		std::cout << "0";
	}

	return 0;
}


//http://codeforces.com/contest/27/problem/D

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

int main()
{
	long long n;
	std::cin >> n;
	if (n < 3) {
		std::cout << "0";
		return 0;
	}

	std::vector<long> seq;
	std::vector<int> monotonicity;

	long long currentVal;
	std::cin >> currentVal;
	seq.push_back(currentVal);

	for (int i = 1; i < n; ++i) {
		std::cin >> currentVal;
		seq.push_back(currentVal);
		if (seq[i] == seq[i - 1]) monotonicity.push_back(0);
		if (seq[i] > seq[i - 1]) monotonicity.push_back(1);
		if (seq[i] < seq[i - 1]) monotonicity.push_back(-1);
	}

	std::vector<int> inc = { 1 };
	std::vector<int> dec = { -1 };
	auto resultUp = std::find_first_of(monotonicity.begin(), monotonicity.end(), inc.begin(), inc.end());
	auto resultDown = std::find_first_of(monotonicity.begin(), monotonicity.end(), dec.begin(), dec.end());

	if (resultUp != monotonicity.end() && resultDown != monotonicity.end()) {
		int indexUp = std::distance(monotonicity.begin(), resultUp) + 1;
		int indexDown = std::distance(monotonicity.begin(), resultDown) + 1;

		if (indexUp < indexDown) {
			std::cout << "3" << std::endl;
			std::cout << indexUp << " " << indexDown << " " << indexDown + 1;
		} else {
			std::cout << "3" << std::endl;
			std::cout << indexDown << " " << indexUp << " " << indexUp + 1;
		}
	} else {
		std::cout << "0";
	}

	return 0;
}


#include <iostream>
#include <cmath>
#include <vector>

int main()
{
	long long n;
	std::cin >> n;
	std::vector<long> seq;
	for (int i = 0; i < n; ++i) {
		long long currentVal;
		std::cin >> currentVal;
		seq.push_back(currentVal);
	}
	for (int i = 0; i < seq.size(); ++i)
		for (int j = i + 1; j < seq.size(); ++j)
			for (int k = j + 1; j < seq.size(); ++k) {

				if (seq[i] < seq[j] && seq[j] > seq[k]) {
					std::cout << "3" << std::endl;
					std::cout << i + 1 << " " << j + 1 << " " << k + 1;
					return 0;
				}
				if (seq[i] > seq[j] && seq[j] < seq[k]) {
					std::cout << "3" << std::endl;
					std::cout << i + 1 << " " << j + 1 << " " << k + 1;
					return 0;
				}
			}
	std::cout << "0";
	return 0;
}


//http://codeforces.com/contest/27/problem/D

#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>

int main()
{
	long long n;
	std::cin >> n;
	if (n < 3) {
		std::cout << "0";
		return 0;
	}

	std::vector<long> seq;
	std::vector<int> monotonicity;

	long long currentVal;
	std::cin >> currentVal;
	seq.push_back(currentVal);

	for (int i = 1; i < n; ++i) {
		std::cin >> currentVal;
		seq.push_back(currentVal);
		if (seq[i] == seq[i - 1]) monotonicity.push_back(0);
		if (seq[i] > seq[i - 1]) monotonicity.push_back(1);
		if (seq[i] < seq[i - 1]) monotonicity.push_back(-1);
	}

	std::vector<int> inc = { 1 };
	std::vector<int> dec = { -1 };
	auto resultUp = std::find_first_of(monotonicity.begin(), monotonicity.end(), inc.begin(), inc.end());
	auto resultDown = std::find_first_of(monotonicity.begin(), monotonicity.end(), dec.begin(), dec.end());

	if (resultUp != monotonicity.end() && resultDown != monotonicity.end()) {
		int indexUp = std::distance(monotonicity.begin(), resultUp) + 1;
		int indexDown = std::distance(monotonicity.begin(), resultDown) + 1;

		if (indexUp < indexDown) {
			std::cout << "3" << std::endl;
			std::cout << indexUp << " " << indexDown << " " << indexDown + 1;
		} else {
			std::cout << "3" << std::endl;
			std::cout << indexDown << " " << indexDown + 1 << " " << indexUp + 1;
		}
	} else {
		std::cout << "0";
	}

	return 0;
}


//http://codeforces.com/contest/27/problem/D

#include <iostream>
#include <cmath>
#include <vector>

int main()
{
	long long n;
	std::cin >> n;
	if (n < 3) {
		std::cout << "0";
		return 0;
	}
	std::vector<long> seq;
	for (int i = 0; i < n; ++i) {
		long long currentVal;
		std::cin >> currentVal;
		seq.push_back(currentVal);
	}
	for (int i = 0; i < seq.size(); ++i)
		for (int j = i + 1; j < seq.size(); ++j)
			for (int k = j + 1; j < seq.size(); ++k) {

				if (seq[i] < seq[j] && seq[j] > seq[k]) {
					std::cout << "3" << std::endl;
					std::cout << i + 1 << " " << j + 1 << " " << k + 1;
					return 0;
				}
				if (seq[i] > seq[j] && seq[j] < seq[k]) {
					std::cout << "3" << std::endl;
					std::cout << i + 1 << " " << j + 1 << " " << k + 1;
					return 0;
				}
			}
	std::cout << "0";
	return 0;
}


#include <iostream>
#include <cmath>
#include <vector>

int main()
{
	long long n;
	std::cin >> n;
	std::vector<long> seq;
	for (int i = 0; i < n; ++i) {
		long long currentVal;
		std::cin >> currentVal;
		seq.push_back(currentVal);
	}
	for (int i = 0; i < seq.size(); ++i)
		for (int j = i + 1; j < seq.size(); ++j)
			for (int k = j + 1; j < seq.size(); ++k) {

				if (seq[i] < seq[j] && seq[j] > seq[k]) {
					std::cout << "3";
					std::cout << i + 1 << " " << j + 1 << " " << k + 1;
					return 0;
				}
				if (seq[i] > seq[j] && seq[j] < seq[k]) {
					std::cout << "3";
					std::cout << i + 1 << " " << j + 1 << " " << k + 1;
					return 0;
				}
			}
	std::cout << "0";
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

template<typename T>
void sci(T& t) {
    cin >> t;
}

template<typename T, typename... Ts>
void sci(T& t, Ts&... ts) {
    sci(t);
    sci(ts...);
};

#define scid(vars...) int vars; sci(vars)
#define scidl(vars...) lint vars; sci(vars)
#define scidd(vars...) double vars; sci(vars)
#define scids(vars...) string vars; sci(vars)

typedef long long lint;

int a[111111];

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);

    scid(n);
    for (int i = 0; i < n; i++) {
        sci(a[i]);
    }

    if (n <= 2) {
        cout << 0;
        return 0;
    }

    int st = 0;
    while (st + 1 < n && a[st] == a[st + 1]) {
        st++;
    }

    if (st + 1 == n) {
        cout << 0;
        return 0;
    }

    if (a[st] > a[st + 1]) {
        for (int i = 0; i < n; i++) {
            a[i] *= -1;
        }
    }

    for (int i = st + 1; i + 1 < n; i++) {
        if (a[i] > a[i + 1]) {
            cout << 3 << "\n";
            cout << st + 1 << " " << i + 1 << " " << i + 2;
            return 0;
        }
    }

    cout << 0;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

template<typename T>
void sci(T& t) {
    cin >> t;
}

template<typename T, typename... Ts>
void sci(T& t, Ts&... ts) {
    sci(t);
    sci(ts...);
};

#define scid(vars...) int vars; sci(vars)
#define scidl(vars...) lint vars; sci(vars)
#define scidd(vars...) double vars; sci(vars)
#define scids(vars...) string vars; sci(vars)

typedef long long lint;

int a[111111];

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);

    scid(n);
    for (int i = 0; i < n; i++) {
        sci(a[i]);
    }

    if (n <= 2) {
        cout << 0;
        return 0;
    }

    if (a[0] > a[1]) {
        for (int i = 0; i < n; i++) {
            a[i] *= -1;
        }
    }

    for (int i = 1; i + 1 < n; i++) {
        if (a[i] > a[i + 1]) {
            cout << 3 << "\n";
            cout << 1 << " " << i + 1 << " " << i + 2;
            return 0;
        }
    }

    cout << 0;

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

template<typename T>
void sci(T& t) {
    cin >> t;
}

template<typename T, typename... Ts>
void sci(T& t, Ts&... ts) {
    sci(t);
    sci(ts...);
};

#define scid(vars...) int vars; sci(vars)
#define scidl(vars...) lint vars; sci(vars)
#define scidd(vars...) double vars; sci(vars)
#define scids(vars...) string vars; sci(vars)

typedef long long lint;

int a[111111];

int main() {
    ios_base::sync_with_stdio(false); cin.tie(0);

    scid(n);
    for (int i = 0; i < n; i++) {
        sci(a[i]);
    }

    if (n <= 2) {
        cout << 0;
        return 0;
    }

    int st = 0;
    while (st + 1 < n && a[st] == a[st + 1]) {
        st++;
    }

    for (int i = st + 1; i + 1 < n; i++) {
        if (a[i] > a[i + 1]) {
            cout << 3 << "\n";
            cout << st + 1 << " " << i + 1 << " " << i + 2;
            return 0;
        }
    }

    cout << 0;

    return 0;
}


#include <bits/stdc++.h>
/**
 * @author Tran Anh Tai
 */
using namespace std;

int n;
int a[100000];
vector<int> v;
const int CONST = 0;
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> a[i];
        if (i == 0 || a[i] != a[i - 1]){
            v.push_back(i);
        }
    }
    if (v.size() <= 2){
        cout << 0 << "\n";
        return CONST;
    }
    for (int i = 1; i < v.size() - 1; i++){
        if (a[v[i]] > max(a[v[i - 1]], a[v[i + 1]])){
            cout << 3 << "\n";
            cout << v[i - 1] + 1 << " " << v[i] + 1 << " " << v[i + 1] + 1 << "\n";
            return CONST;
        }
        if (a[v[i]] < min(a[v[i - 1]], a[v[i + 1]])){
            cout << 3 << "\n";
            cout << v[i - 1] + 1 << " " << v[i] + 1 << " " << v[i + 1] + 1 << "\n";
            return CONST;
        }
    }
    cout << 0 << "\n";
    return CONST;
}


#include <bits/stdc++.h>
/**
 *@author Tran Anh Tai
 */
using namespace std;

int n;
int a[100000];

signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> a[i];
    }
    for (int i = 1; i < n - 1; i++){
        if (a[i] > a[i - 1] && a[i] > a[i + 1]){
            cout << 3 << "\n";
            cout <<a[i - 1] << " " << a[i] << " " << a[i + 1] << "\n";
            return 0;
        }
    }
    cout << 0 << "\n";
    return 0;
}


#include <bits/stdc++.h>
/**
 * @author Tran Anh Tai
 */
using namespace std;

int n;
int a[100000];
vector<int> v;
const int CONST = 26072000;
signed main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    cin >> n;
    for (int i = 0; i < n; i++){
        cin >> a[i];
        if (i == 0 || a[i] != a[i - 1]){
            v.push_back(i);
        }
    }
    if (v.size() <= 2){
        cout << 0 << "\n";
        return CONST;
    }
    for (int i = 1; i < v.size() - 1; i++){
        if (a[v[i]] > max(a[v[i - 1]], a[v[i + 1]])){
            cout << 3 << "\n";
            cout << v[i - 1] + 1 << " " << v[i] + 1 << " " << v[i + 1] + 1 << "\n";
            return CONST;
        }
        if (a[v[i]] < min(a[v[i - 1]], a[v[i + 1]])){
            cout << 3 << "\n";
            cout << v[i - 1] + 1 << " " << v[i] + 1 << " " << v[i + 1] + 1 << "\n";
            return CONST;
        }
    }
    cout << 0 << "\n";
    return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0,l=0;
	vector <int> a;
	vector <pair<int,int> > b;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	b.pB(mP(a[0],0));
	for(int i=1;i<n;i++)
		if(a[i]!=a[i-1])
			b.pB(mP(a[i],i));
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X>b[i-1].X)
			continue;
		if(i==j+1)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	j=0;
	l=0;
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X<b[i-1].X)
			continue;
		if(i==j+1)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0,l=0;
	vector <int> a;
	vector <pair<int,int> > b;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	b.pB(mP(a[0],0));
	for(int i=1;i<n;i++)
		if(a[i]!=a[i-1])
			b.pB(mP(a[i],i));
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X>b[i-1].X)
			continue;
		if(b[i-1].Y==j)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	j=0;
	l=0;
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X<b[i-1].X)
			continue;
		if(b[i-1].Y==j)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0;
	vector <int> a;
	vector <pair<int,int> > b;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	b.pB(mP(a[0],0));
	for(int i=1;i<n;i++)
		if(a[i]!=a[i-1])
			b.pB(mP(a[i],i));
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X>b[i-1].X)
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	j=0;
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X<b[i-1].X)
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0,l=0;
	vector <int> a;
	vector <pair<int,int> > b;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	b.pB(mP(a[0],0));
	for(int i=1;i<n;i++)
		if(a[i]!=a[i-1])
			b.pB(mP(a[i],i));
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X>b[i-1].X)
			continue;
		if(b[i].Y==j+1)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	j=0;
	l=0;
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X<b[i-1].X)
			continue;
		if(b[i].Y==j+1)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0;
	vector <int> a;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	for(int i=1;i<n;i++)
	{
		if(a[i]>a[i-1])
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<i<<' '<<i+1;
		return 0;
	}
	j=0;
	for(int i=1;i<n;i++)
	{
		if(a[i]<a[i-1])
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<i<<' '<<i+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0,l=0;
	vector <int> a;
	vector <pair<int,int> > b;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	b.pB(mP(a[0],0));
	for(int i=1;i<n;i++)
		if(a[i]!=a[i-1])
			b.pB(mP(a[i],i));
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X>b[i-1].X)
			continue;
		if(i==j+1)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	j=0;
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X<b[i-1].X)
			continue;
		if(i==j+1)
		{
			l++;
			j=b[l].Y;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0;
	vector <int> a;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	for(int i=1;i<n;i++)
	{
		if(a[i]>=a[i-1])
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<i<<' '<<i+1;
		return 0;
	}
	j=0;
	for(int i=1;i<n;i++)
	{
		if(a[i]<=a[i-1])
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<i<<' '<<i+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#include <bits/stdc++.h>
#define T top()
#define P pop()
#define E end()
#define S size()
#define B begin()
#define X first
#define Y second
#define RE resize
#define mP make_pair
#define pB push_back
#define ST setprecision
typedef long long ll;
typedef long double lb;
using namespace std;
int main()
{
	ios_base::sync_with_stdio(false);
	int n,j=0;
	vector <int> a;
	vector <pair<int,int> > b;
	cin>>n;
	a.RE(n);
	for(int i=0;i<n;i++)
		cin>>a[i];
	b.pB(mP(a[0],0));
	for(int i=1;i<n;i++)
		if(a[i]!=a[i-1])
			b.pB(mP(a[i],i));
	for(int i=1;i<b.S;i++)
	{
		if(b[i].X>b[i-1].X)
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	j=0;
	for(int i=1;i<n;i++)
	{
		if(b[i].X<b[i-1].X)
			continue;
		if(i==j+1)
		{
			j++;
			continue;
		}
		cout<<3<<endl<<j+1<<' '<<b[i-1].Y+1<<' '<<b[i].Y+1;
		return 0;
	}
	cout<<0;
	return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100005
int n,a[maxn],t[3];
bool f1,f2;
bool chkt(){
	if(t[0]==t[1]||t[1]==t[2])return 1;
	return (a[t[0]]<=a[t[1]] && a[t[1]]<=a[t[2]])||(a[t[0]]>=a[t[1]] && a[t[1]]>=a[t[2]]);
}
int main()
{
	srand(19260817);
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	while(1)
	{
		For(i,0,2)t[i]=rand()%n+1;
		sort(t,t+3);
		if(!chkt()){
			printf("%d %d %d",t[0],t[1],t[2]);
			return 0;
		}
	}
    return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100007
int n,a[maxn];
bool f1,f2;
int main()
{
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	For(i,3,n)
	    if((long long)(a[i-1]-a[1])*(a[i]-a[i-1])<0){
	        printf("%d %d %d\n",1,i-1,i);
	        return 0;
	    }
    return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100007
int n,p1,p2,a[maxn];
bool f1,f2;
bool v1[maxn],v2[maxn];
void calc(int l,int r){
	p1=p2=l;
	For(i,l+1,r)if(a[i]>a[p1])p1=i;
	For(i,l+1,r)if(a[i]<a[p2])p2=i;
	For(i,l,r)v1[i]=(a[i]==a[p1]);
	For(i,l,r)v2[i]=(a[i]==a[p2]);
}
int t[3];
bool chkt(){
	sort(t,t+3);
	if(t[0]==t[1]||t[1]==t[2])return 1;
	return (a[t[0]]<=a[t[1]] && a[t[1]]<=a[t[2]])||(a[t[0]]>=a[t[1]] && a[t[1]]>=a[t[2]]);
}
void random(){
	while(1)
	{
		For(i,0,2)t[i]=rand()%n+1;
		sort(t,t+3);
		if(!chkt()){
			printf("%d %d %d",t[0],t[1],t[2]);
			return;
		}
	}
}
int main()
{
//	freopen("test.in","r",stdin);
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	calc(1,n);
	if(!v1[1]&&!v1[n]) printf("1 %d %d",p1,n);
	else if(!v2[1]&&!v2[n])printf("1 %d %d",p2,n);
	else random();
    return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100007
int n,p1,p2,a[maxn];
bool f1,f2;
bool v1[maxn],v2[maxn];
void calc(int l,int r){
	p1=p2=l;
	memset(v1,0,sizeof v1);
	memset(v2,0,sizeof v2);
	For(i,l+1,r)if(a[i]>a[p1])p1=i;
	For(i,l+1,r)if(a[i]<a[p2])p2=i;
	For(i,l,r)if(a[i]==a[p1])v1[i]=1;
	For(i,l,r)if(a[i]==a[p2])v2[i]=1;
}
int main()
{
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	calc(1,n);
	if(!v1[1]&&!v1[n]) printf("1 %d %d",p1,n);
	else if(!v2[1]&&!v2[n])printf("1 %d %d",p2,n);
	else{
		calc(2,n-1);
		if(!v1[1]&&!v1[n]) printf("2 %d %d",p1,n-1);
		else printf("2 %d %d",p2,n-1);
	}
    return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100007
int n,p1,p2,a[maxn];
bool f1,f2;
bool v1[maxn],v2[maxn];
void calc(int l,int r){
	p1=p2=l;
	For(i,l+1,r)if(a[i]>a[p1])p1=i;
	For(i,l+1,r)if(a[i]<a[p2])p2=i;
	For(i,l,r)v1[i]=(a[i]==a[p1]);
	For(i,l,r)v2[i]=(a[i]==a[p2]);
}
int t[3];
bool chkt(){
	sort(t,t+3);
	if(t[0]==t[1]||t[1]==t[2])return 1;
	return (a[t[0]]<=a[t[1]] && a[t[1]]<=a[t[2]])||(a[t[0]]>=a[t[1]] && a[t[1]]>=a[t[2]]);
}
bool random(){
	For(i,1,100000)
	{
		For(i,0,2)t[i]=rand()%n+1;
		if(!chkt()){
			printf("%d %d %d",t[0],t[1],t[2]);
			return 1;
		}
	}return 0;
}
void solve(int l,int r)
{
	calc(l,r);
	if(!v1[l]&&!v1[r]) printf("%d %d %d",l,p1,n);
	else if(!v2[l]&&!v2[r])printf("%d %d %d",l,p2,n);
	else solve(l+1,r-1);
}
int main()
{
	freopen("test.in","r",stdin);
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	if(random())return 0;
	solve(1,n);
    return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100007
int n,a[maxn];
bool f1,f2;
int main()
{
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	For(i,3,n)
	    if((long long)(a[i-1]-a[0])*(a[i]-a[i-1])<0){
	        printf("%d %d %d\n",0,i-1,i);
	    }
    return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100007
int n,p1,p2,a[maxn];
bool f1,f2;
bool v1[maxn],v2[maxn];
void calc(int l,int r){
	p1=p2=l;
	For(i,l+1,r)if(a[i]>a[p1])p1=i;
	For(i,l+1,r)if(a[i]<a[p2])p2=i;
	For(i,l,r)v1[i]=(a[i]==a[p1]);
	For(i,l,r)v2[i]=(a[i]==a[p2]);
}
int t[3];
bool chkt(){
	sort(t,t+3);
	if(t[0]==t[1]||t[1]==t[2])return 1;
	return (a[t[0]]<=a[t[1]] && a[t[1]]<=a[t[2]])||(a[t[0]]>=a[t[1]] && a[t[1]]>=a[t[2]]);
}
bool random(){
	For(i,1,100000)
	{
		For(i,0,2)t[i]=rand()%n+1;
		if(!chkt()){
			printf("%d %d %d",t[0],t[1],t[2]);
			return 1;
		}
	}return 0;
}
void solve(int l,int r)
{
	calc(l,r);
	if(!v1[l]&&!v1[r]) printf("%d %d %d",l,p1,n);
	else if(!v2[l]&&!v2[r])printf("%d %d %d",l,p2,n);
	else solve(l+1,r-1);
}
int main()
{
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	if(random())return 0;
	solve(1,n);
    return 0;
}


#pragma GCC optimize(2)
#include<bits/stdc++.h>
#define For(i,a,b) for(register int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(register int i=(a);i>=(b);--i)
using namespace std;
inline int read()
{
    char c=getchar();int x=0;bool f=0;
    for(;!isdigit(c);c=getchar())f^=!(c^45);
    for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
    if(f)x=-x;return x;
}
#define maxn 100007
int n,a[maxn];
bool f1,f2;
int main()
{
	n=read();
	For(i,1,n)a[i]=read();
	For(i,2,n){
		if(a[i]>a[i-1])f1=i;
		if(a[i]<a[i-1])f2=i;
	}
	if(!f1||!f2){
		puts("0");
		return 0;
	}
	puts("3");
	For(i,3,n)
	    if((long long)(a[i-1]-a[1])*(a[i]-a[i-1])<0){
	        printf("%d %d %d\n",1,i-1,i);
	    }
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    if(n<=2)
    {
        printf("0\n");return 0;
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {

        if(arr[i]<pre)
        {
            int j=i+1;
            while(j<n&&arr[j]<=arr[j-1])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }
            break;
        }
         if(arr[i]>pre)
        {
            int j=i+1;
            while(j<n&&arr[j]>=arr[j-1])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }
            break;
        }
    }
     printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {
        if(arr[i]>pre)
        {
            int j=i;
            while(j<n&&arr[j]>=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;break;
            }
        }
        else if(arr[i]<pre)
        {
            int j=i;
            while(j<n&&arr[j]<=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;break;
            }
        }
    }
    if(y)printf("3\n%d %d %d\n",x+1,y+1,z+1);
    else printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    if(n<=2)
    {
        printf("0\n");return 0;
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {

        if(arr[i]<pre)
        {
            int j=i-1;
            while(j<n&&arr[j]<=arr[j-1])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }
            break;
        }
         if(arr[i]>pre)
        {
            int j=i+1;
            while(j<n&&arr[j]>=arr[j-1])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }
            break;
        }
    }
     printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    if(n<=2)
    {
        printf("0\n");return 0;
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {

        if(arr[i]<pre)
        {
            int j=i;
            while(j<n&&arr[j]<=arr[i])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }
            break;
        }
         if(arr[i]>pre)
        {
            int j=i;
            while(j<n&&arr[j]>=arr[i])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }
            break;
        }
    }
     printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[20000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {
        if(arr[i]>pre)
        {
            int j=i;
            while(j<n&&arr[j]>=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;break;
            }
        }
        else if(arr[i]<pre)
        {
            int j=i;
            while(j<n&&arr[j]<=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;break;
            }
        }
    }
    if(y)printf("3\n%d %d %d\n",x+1,y+1,z+1);
    else printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    if(n<=2)
    {
        printf("0\n");return 0;
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {

        if(arr[i]<pre)
        {
            int j=i;
            while(j<n&&arr[j]<=arr[i])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }

        }
         if(arr[i]>pre)
        {
            int j=i;
            while(j<n&&arr[j]>=arr[i])
                j++;
            if(j<n)
            {
                x=temp;y=j-1;z=j;
                printf("3\n%d %d %d\n",x+1,y+1,z+1);return 0;
            }

        }
    }
     printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {
        if(arr[i]>pre)
        {
            int j=i;
            while(j<n&&arr[j]>=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;
            }
            break;
        }
        else if(arr[i]<pre)
        {
            int j=i;
            while(j<n&&arr[j]<=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;
            }
            break;
        }
    }
    if(y)printf("3\n%d %d %d\n",x+1,y+1,z+1);
    else printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    if(n<=2)
    {
        printf("0\n");return 0;
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {

        if(arr[i]<pre)
        {
            int j=i;
            while(j<n&&arr[j]<=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;
            }
            break;
        }
         if(arr[i]>pre)
        {
            int j=i;
            while(j<n&&arr[j]>=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;
            }
            break;
        }
    }
    if(y)printf("3\n%d %d %d\n",x+1,y+1,z+1);
    else printf("0\n");
    return 0;
}


#pragma comment(linker, "/stack:640000000")

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define scanl(a) scanf("%lld",&a)
#define scanii(a,b) scanf("%d%d",&a,&b)
#define scaniii(a,b,c) scanf("%d%d%d",&a,&b,&c)
#define scanll(a,b) scanf("%lld%lld",&a,&b)
#define scanlll(a,b,c) scanf("%lld%lld%lld",&a,&b,&c)
#define scani(a) scanf("%d",&a)
#define clr(a) memset(a,0,sizeof(a))
#define clr_(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
#define pii pair<int,int>
#define sqr(a) a*a
#define eps 1e-9
#define inf INT_MAX
#define pi acos(-1.0)
#define ff first
#define ss second
#define INF 1e18
#define siz 100010
#define endl '\n'
#define vsort(v) sort(v.begin(),v.end())
ll power(ll x,ll n)
{
    ///complexity O(logn)
    if(n==0)return 1;
    else if(n%2==0)
    {
        ll y=power(x,n/2);
        return y*y;
    }
    else
        return x*power(x,n-1);
}
int strTOint(string s)
{
    stringstream ss;
    int x;
    ss<<s;
    ss>>x;
    return x;
}
ll bigmod(ll a,ll p,ll mod)
{
    ll ans=1;
    while(p)
    {
        if(p&1)ans=ans*a%mod;
        a=a*a%mod;
        p>>=1;
    }
    return ans;
}
ll euclid_x,euclid_y,euclid_d,euclid_g;
void ext_gcd(ll a,ll b)
{
    if(b==0)
    {
        euclid_x=1;euclid_y=0;euclid_d=a;return;
    }
    ext_gcd(b,a%b);
    ll x1=euclid_y;
    ll y1=euclid_x-(a/b)*euclid_y;
    euclid_x=x1;
    euclid_y=y1;
}

ll modInv (ll a,ll m ) {

    ///if m prime
    ///ll x = bigmod( a, m - 2, m ); ///(ax)%m = 1
   /// i m not prime;
    ext_gcd( a, m);
    ///Process x so that it is between 0 and m-1
    euclid_x %= m;
    if ( euclid_x < 0 ) euclid_x += m;
    return euclid_x;
}
vector<int>num;
void input(string s)
{
    ///declare a gloabl vector num & values will be in num
    istringstream ss(s);
    int n;
    while(ss>>n)
    {
        num.pb(n);
    }
}
int fx[]={0,0,-1,1,-1,1,1,-1};
int fy[]={1,-1,0,0,1,1,-1,-1};
///FOR KNIGHT MOVE
///int fx[]={2,1,-1,-2,-2,-1,1,2};
///int fy[]={1,2,2,1,-1,-2,-2,-1};
map<string,int>mp;
vector<int>v;
int arr[200000];
int main()
{
    /// ios_base::sync_with_stdio(0);
    /// cin.tie(0);
    ///freopen("in.txt","r",stdin);
    ///freopen("out.txt","w",stdout);
    int n;
    scani(n);
    for(int i=0;i<n;i++)
    {
        scani(arr[i]);
    }
    if(n<=2)
    {
        printf("0\n");return 0;
    }
    int pre=arr[0];
    int x=0,y=0,z=0;
    int temp=0;
    for(int i=1;i<n;i++)
    {
        if(arr[i]>pre)
        {
            int j=i;
            while(j<n&&arr[j]>=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;
            }
            break;
        }
        else if(arr[i]<pre)
        {
            int j=i;
            while(j<n&&arr[j]<=arr[i])
                j++;
            if(j<n)
            {
                x=0;y=j-1;z=j;
            }
            break;
        }
    }
    if(y)printf("3\n%d %d %d\n",x+1,y+1,z+1);
    else printf("0\n");
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define sc(x) scanf("%d", &x)
#define scl(x) scanf("%I64d", &x)
#define loop(i,s,e) for(int i=s ; i<e ; i++)
#define rep(i,s,e) for(int i=s ; i>=e ; i--)
#define INF 1000000
#define MOD 1000000007
#define f first
#define s second
#define EPS 1e-7
#define Rd freopen("in.txt", "r", stdin)
#define Wr freopen("out.txt", "w", stdout)
#define M_PI           3.14159265358979323846  /* pi */
//#define DFS_WHITE -1
//#define DFS_BLACK 0

int main() {
    // Rd;
    // Wr;
    int n, arr[100010];
    sc(n);
    loop(i,0,n) sc(arr[i]);

    if(n <= 2) {
        printf("0\n");
        return 0;
    }
    ll pre = arr[1] - arr[0];
    loop(i,2,n){
        ll diff = arr[i] - arr[i-1];
        // printf("%d %d\n", pre, diff);
        if(diff * pre < 0){
            printf("%d\n%d %d %d\n", 3, 1, i, i+1);
            return 0;
        }
        if(diff != 0)
            pre = diff;
    }
    printf("0\n");
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define sc(x) scanf("%d", &x)
#define scl(x) scanf("%I64d", &x)
#define loop(i,s,e) for(int i=s ; i<e ; i++)
#define rep(i,s,e) for(int i=s ; i>=e ; i--)
#define INF 1000000
#define MOD 1000000007
#define f first
#define s second
#define EPS 1e-7
#define Rd freopen("in.txt", "r", stdin)
#define Wr freopen("out.txt", "w", stdout)
#define M_PI           3.14159265358979323846  /* pi */
//#define DFS_WHITE -1
//#define DFS_BLACK 0

int main() {
	// Rd;
	// Wr;
	int n, arr[100010];
	sc(n);
	loop(i,0,n) sc(arr[i]);

	if(n <= 2) {
		printf("0\n");
		return 0;
	}
	int pre = arr[1] - arr[0];
	loop(i,2,n){
		int diff = arr[i] - arr[i-1];
		// printf("%d %d\n", pre, diff);
		if(diff * pre < 0){
			printf("%d\n%d %d %d\n", 3, 1, i, i+1);
			return 0;
		}
		if(diff != 0)
			pre = diff;
	}
	printf("0\n");
	return 0;
}

// vector<string> split(string s, char pat) {
// 	vector<string> vec;
// 	string part = "";
// 	loop(i,0,s.size()){
// 		if( s[i] == pat ){
// 			if( !part.empty() )
// 				vec.push_back(part);
// 			part = "";
// 		}
// 		else part += s[i];
// 	}
// 	if( !part.empty() )
// 		vec.push_back(part);
// 	return vec;
// }
// string AdjList[30];

// int main() {
// 	Rd;
// 	string line;
// 	while(cin >> line){
// 		if(line == "#") break;
// 		vector<string> edge = split(line, ';');
// 		// printf("%d\n", edge.size());
// 		loop(i,0,edge.size()){
// 			vector<string> vertx = split(edge[i], ':');
// 			AdjList[ vertx[0][0]-'A' ] += vertx[1];

// 		}
// 		loop(i,0,26){
// 			// printf("%c => %s\n", i+'A',  AdjList[i].c_str());
// 		}
// 	}
// 	return 0;
// }


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define sc(x) scanf("%d", &x)
#define scl(x) scanf("%I64d", &x)
#define loop(i,s,e) for(int i=s ; i<e ; i++)
#define rep(i,s,e) for(int i=s ; i>=e ; i--)
#define INF 1000000
#define MOD 1000000007
#define f first
#define s second
#define EPS 1e-7
#define Rd freopen("in.txt", "r", stdin)
#define Wr freopen("out.txt", "w", stdout)
#define M_PI           3.14159265358979323846  /* pi */
//#define DFS_WHITE -1
//#define DFS_BLACK 0

int main() {
	// Rd;
	// Wr;
	int n, arr[100010];
	sc(n);
	loop(i,0,n) sc(arr[i]);

	if(n <= 2) {
		printf("0\n");
		return 0;
	}
	loop(i,2,n){
		int diff = arr[i] - arr[i-1];
		int pre = arr[i-1] - arr[0];
		if(diff * pre < 0){
			printf("%d\n%d %d %d\n", 3, 1, i, i+1);
			return 0;
		}
	}
	printf("0\n");
	return 0;
}

// vector<string> split(string s, char pat) {
// 	vector<string> vec;
// 	string part = "";
// 	loop(i,0,s.size()){
// 		if( s[i] == pat ){
// 			if( !part.empty() )
// 				vec.push_back(part);
// 			part = "";
// 		}
// 		else part += s[i];
// 	}
// 	if( !part.empty() )
// 		vec.push_back(part);
// 	return vec;
// }
// string AdjList[30];

// int main() {
// 	Rd;
// 	string line;
// 	while(cin >> line){
// 		if(line == "#") break;
// 		vector<string> edge = split(line, ';');
// 		// printf("%d\n", edge.size());
// 		loop(i,0,edge.size()){
// 			vector<string> vertx = split(edge[i], ':');
// 			AdjList[ vertx[0][0]-'A' ] += vertx[1];

// 		}
// 		loop(i,0,26){
// 			// printf("%c => %s\n", i+'A',  AdjList[i].c_str());
// 		}
// 	}
// 	return 0;
// }


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define sc(x) scanf("%d", &x)
#define scl(x) scanf("%I64d", &x)
#define loop(i,s,e) for(int i=s ; i<e ; i++)
#define rep(i,s,e) for(int i=s ; i>=e ; i--)
#define INF 1000000
#define MOD 1000000007
#define f first
#define s second
#define EPS 1e-7
#define Rd freopen("in.txt", "r", stdin)
#define Wr freopen("out.txt", "w", stdout)
#define M_PI           3.14159265358979323846  /* pi */
//#define DFS_WHITE -1
//#define DFS_BLACK 0

int main() {
	// Rd;
	// Wr;
	int n, arr[100010];
	sc(n);
	loop(i,0,n) sc(arr[i]);

	if(n <= 2) {
		printf("0\n");
		return 0;
	}
	loop(i,2,n){
		ll diff = arr[i] - arr[i-1];
		ll pre = arr[i-1] - arr[0];
		if(diff * pre < 0){
			printf("%d\n%d %d %d\n", 3, 1, i, i+1);
			return 0;
		}
	}
	printf("0\n");
	return 0;
}

// vector<string> split(string s, char pat) {
// 	vector<string> vec;
// 	string part = "";
// 	loop(i,0,s.size()){
// 		if( s[i] == pat ){
// 			if( !part.empty() )
// 				vec.push_back(part);
// 			part = "";
// 		}
// 		else part += s[i];
// 	}
// 	if( !part.empty() )
// 		vec.push_back(part);
// 	return vec;
// }
// string AdjList[30];

// int main() {
// 	Rd;
// 	string line;
// 	while(cin >> line){
// 		if(line == "#") break;
// 		vector<string> edge = split(line, ';');
// 		// printf("%d\n", edge.size());
// 		loop(i,0,edge.size()){
// 			vector<string> vertx = split(edge[i], ':');
// 			AdjList[ vertx[0][0]-'A' ] += vertx[1];

// 		}
// 		loop(i,0,26){
// 			// printf("%c => %s\n", i+'A',  AdjList[i].c_str());
// 		}
// 	}
// 	return 0;
// }


#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef vector<int> vi;
typedef vector<ll> vll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
#define sc(x) scanf("%d", &x)
#define scl(x) scanf("%I64d", &x)
#define loop(i,s,e) for(int i=s ; i<e ; i++)
#define rep(i,s,e) for(int i=s ; i>=e ; i--)
#define INF 1000000
#define MOD 1000000007
#define f first
#define s second
#define EPS 1e-7
#define Rd freopen("in.txt", "r", stdin)
#define Wr freopen("out.txt", "w", stdout)
#define M_PI           3.14159265358979323846  /* pi */
//#define DFS_WHITE -1
//#define DFS_BLACK 0

int main() {
	// Rd;
	// Wr;
	int n, arr[100010];
	sc(n);
	loop(i,0,n) sc(arr[i]);

	if(n <= 2) {
		printf("0\n");
		return 0;
	}
	int pre = arr[1] - arr[0];
	loop(i,2,n){
		int diff = arr[i] - arr[i-1];
		if(diff * pre < 0){
			printf("%d\n%d %d %d\n", 3, 1, i, i+1);
			return 0;
		}
	}
	printf("0\n");
	return 0;
}

// vector<string> split(string s, char pat) {
// 	vector<string> vec;
// 	string part = "";
// 	loop(i,0,s.size()){
// 		if( s[i] == pat ){
// 			if( !part.empty() )
// 				vec.push_back(part);
// 			part = "";
// 		}
// 		else part += s[i];
// 	}
// 	if( !part.empty() )
// 		vec.push_back(part);
// 	return vec;
// }
// string AdjList[30];

// int main() {
// 	Rd;
// 	string line;
// 	while(cin >> line){
// 		if(line == "#") break;
// 		vector<string> edge = split(line, ';');
// 		// printf("%d\n", edge.size());
// 		loop(i,0,edge.size()){
// 			vector<string> vertx = split(edge[i], ':');
// 			AdjList[ vertx[0][0]-'A' ] += vertx[1];

// 		}
// 		loop(i,0,26){
// 			// printf("%c => %s\n", i+'A',  AdjList[i].c_str());
// 		}
// 	}
// 	return 0;
// }


#include <bits/stdc++.h>

using namespace std;

int main()
{
    // TLE :3
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);
   int n   , x  , y  ;
   cin >> n ;
   int a[n] ;
   for (int i = 0 ; i< n; i++ )
    cin >> a[i] ;
   for (int j = 0 ; j< n ; j++ ){
        int check = 0 ;
   for (int i = j+1 ; i< n; i++ )
    {
        if ( a[i] > a[j] && check == 0 )
        {
            x = i+1;
            y = a[i] ;
            check = 1 ;
        }
        else if (check == 1 )
        {
            if ( (a[i] >= a[j] && a[i] < y ) || a[i] <= a[j] )
            {
                cout<<"3\n"<<j+1<<" "<< x << " "<<i+1;
                return 0 ;
            }
        }
    }
    check = 0 ;
    for (int i = j+1 ;  i<n ; i++ )
    {
        if (a[i] < a[j] && check == 0 )
        {
            x = i+1 ;
            y = a[i] ;
            check =1;
        }
        // 3 1 2
        else if (check == 1 )
        {
            if (a[i] > y )
            {
                 cout<<"3\n"<<j+1<<" "<< x << " "<<i+1;
                return 0 ;
            }
        }
    }
   }
    cout<<0;
}


#include<bits/stdc++.h>
#define MAX 1000000007
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long int ll;
typedef long double ld;

int main()
{ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
 /*freopen("input.txt", "r", stdin);
 freopen("output.txt", "w", stdout);
 */
 ll n,i,j;
 string s;
 cin>>n;
 ll a[n],b[n];
 for(i=0;i<n;i++)
 {
 	cin>>a[i];
 	b[i]=a[i];
 }
 sort(b,b+n);
 ll ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[i])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }
 ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[n-i-1])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }
 vector<pair<ll,ll> > v;
 for(i=0;i<n;i++)
 {
 	v.push_back(make_pair(a[i],i+1));
 }
 sort(v.begin(),v.end());
 cout<<3<<"\n";
 cout<<v[0].second<<" "<<v[2].second<<" "<<v[1].second;

return 0;
}


#include<bits/stdc++.h>
#define MAX 1000000007
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long int ll;
typedef long double ld;

int main()
{ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
 /*freopen("input.txt", "r", stdin);
 freopen("output.txt", "w", stdout);
 */
 ll n,i,j;
 string s;
 cin>>n;
 ll a[n],b[n];
 for(i=0;i<n;i++)
 {
 	cin>>a[i];
 	b[i]=a[i];
 }
 sort(b,b+n);
 ll ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[i])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }
 ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[n-i-1])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }
 map<ll,ll> mp;
 for(i=0;i<n;i++)
 {
 	mp[a[i]]=i+1;
 }

 cout<<3<<"\n";
 map<ll,ll>::iterator it=mp.begin();
 ll x,y,z;
 x=it->second;
 ++it;
 y=(it)->second;
 ++it;
 z=(it)->second;
 cout<<z<<" "<<x<<" "<<y;

return 0;
}


#include<bits/stdc++.h>
#define MAX 1000000007
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long int ll;
typedef long double ld;

int main()
{ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
 /*freopen("input.txt", "r", stdin);
 freopen("output.txt", "w", stdout);
 */
 ll n,i,j;
 string s;
 cin>>n;
 ll a[n],b[n];
 for(i=0;i<n;i++)
 {
 	cin>>a[i];
 	b[i]=a[i];
 }
 sort(b,b+n);
 ll ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[i])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }
 ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[n-i-1])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }

 ll p1=-1,p2=-1,p3=-1;
 p1=1;
 for(i=1;i<n;i++)
 {
 	if(a[i]>a[p1-1])
 	{
 		p2=i+1;
 		break;
	 }
 }
 if(p2!=-1)
 {
 	for(i;i<n;i++)
 	{
 		if(a[i]<a[p2-1])
 		{
 			p3=i+1;
 			break;
		 }
	 }
 }
 if(p3!=-1)
 {
 	cout<<3<<"\n";
 	cout<<p1<<" "<<p2<<" "<<p3;
 	return 0;
 }
 else
 {
 	for(i=1;i<n;i++)
 	{
 		if(a[i]<a[p1-1])
 		{
 			p2=i+1;
 			break;
		 }
	 }

	 for(i;i<n;i++)
	 {
	 	if(a[i]>a[p2-1])
	 	{
	 		p3=i+1;
	 		break;
		 }
	 }
 }
 if(p3!=-1)
 {
 cout<<3<<"\n";
 cout<<p1<<" "<<p2<<" "<<p3;
 }

return 0;
}


#include<bits/stdc++.h>
#define MAX 1000000007
#define PB push_back
#define MP make_pair
using namespace std;
typedef long long int ll;
typedef long double ld;

int main()
{ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
 /*freopen("input.txt", "r", stdin);
 freopen("output.txt", "w", stdout);
 */
 ll n,i,j;
 string s;
 cin>>n;
 ll a[n],b[n];
 for(i=0;i<n;i++)
 {
 	cin>>a[i];
 	b[i]=a[i];
 }
 sort(b,b+n);
 ll ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[i])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }
 ctr=0;
 for(i=0;i<n;i++)
 {
 	if(a[i]==b[n-i-1])
 		ctr++;
 }
 if(ctr==n)
 {
 	cout<<0;
 	return 0;
 }

 ll p1=-1,p2=-1,p3=-1;
 p1=1;
 for(i=1;i<n;i++)
 {
 	if(a[i]>a[p1-1])
 	{
 		p2=i+1;
 		break;
	 }
 }
 if(p2!=-1)
 {
 	for(i;i<n;i++)
 	{
 		if(a[i]<a[p2-1])
 		{
 			p3=i+1;
 			break;
		 }
	 }
 }
 if(p3!=-1)
 {
 	cout<<3<<"\n";
 	cout<<p1<<" "<<p2<<" "<<p3;
 	return 0;
 }
 else
 {
 	for(i=1;i<n;i++)
 	{
 		if(a[i]<a[p1-1])
 		{
 			p2=i+1;
 			break;
		 }
	 }

	 for(i;i<n;i++)
	 {
	 	if(a[i]>a[p2-1])
	 	{
	 		p3=i+1;
	 		break;
		 }
	 }
 }
 cout<<3<<"\n";
 cout<<p1<<" "<<p2<<" "<<p3;
return 0;
}


#include <iostream>
#include <vector>

using namespace std;

int main() {
    ios::sync_with_stdio(0);
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];

    }
    vector<int> pos;
    pos.push_back(0);
    int val = a[0];
    int up = -1;
    for (int i = 1; i < n; i++) {
        if (up == -1) {
            if (a[i] > val) {
                up = 1;
                val = a[i];
                pos.push_back(i);
            } else if (a[i] < val) {
                up = 0;
                val = a[i];
                pos.push_back(i);
            }
        } else if (up == 1) {
            if (a[i] < val) {
                pos.push_back(i);
                break;
            }
            val = a[i];
        } else if (up == 0) {
            if (a[i] > val) {
                pos.push_back(i);
                break;
            }
            val = a[i];
        }
    }
    if (pos.size() < 3) {
        cout << 0;
    } else {
        cout << 3 << endl;
        for (int x : pos) {
            cout << ++x << " ";
        }
    }
}


#include <iostream>
#include <vector>

using namespace std;

int main() {
    ios::sync_with_stdio(0);
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    vector<int> pos;
    pos.push_back(0);
    int val = a[0];
    int up = -1;
    for (int i = 1; i < n; i++) {
        if (up == -1) {
            if (a[i] > val) {
                up = 1;
                val = a[i];
                pos.push_back(i);
            } else if (a[i] < val) {
                up = 0;
                val = a[i];
                pos.push_back(i);
            }
        } else if (up == 1) {
            if (a[i] < val) {
                pos.push_back(i);
                break;
            }
        } else if (up == 0) {
            if (a[i] > val) {
                pos.push_back(i);
                break;
            }
        }
    }
    if (pos.size() < 3) {
        cout << 0;
    } else {
        cout << 3 << endl;
        for (int x : pos) {
            cout << ++x << " ";
        }
    }
}