The sequence is called ordered if it is non-decreasing or non-increasing. For example, sequnces [3, 1, 1, 0] and [1, 2, 3, 100] are ordered, but the sequence [1, 3, 3, 1] is not. You are given a sequence of numbers. You are to find it's shortest subsequence which is not ordered.

A subsequence is a sequence that can be derived from the given sequence by deleting zero or more elements without changing the order of the remaining elements.
The first line of the input contains one integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">5</sup>). The second line contains *n* space-separated integers — the given sequence. All numbers in this sequence do not exceed 10<sup class="upper-index">6</sup> by absolute value.
from sys import stdin, stdout, setrecursionlimit
input = stdin.readline
# import string
# characters = string.ascii_lowercase
# digits = string.digits
# setrecursionlimit(int(1e6))
# dir = [-1,0,1,0,-1]
# moves = 'NESW'
inf = float('inf')
from functools import cmp_to_key
from collections import defaultdict as dd
from collections import Counter, deque
from heapq import *
import math
from math import floor, ceil, sqrt
def geti(): return map(int, input().strip().split())
def getl(): return list(map(int, input().strip().split()))
def getis(): return map(str, input().strip().split())
def getls(): return list(map(str, input().strip().split()))
def gets(): return input().strip()
def geta(): return int(input())
def print_s(s): stdout.write(s+'\n')

def solve():
    n = geta()
    a = getl()
    mini = 0
    maxi = 0
    min_so_far = [-1]*n
    max_so_far = [-1]*n
    min_so_far[-1] = n-1
    max_so_far[-1] = n-1
    for i in range(n-2, -1, -1):
        if a[i] < a[min_so_far[i+1]]:
            min_so_far[i] = i
        else:
            min_so_far[i] = min_so_far[i+1]
        if a[i] > a[max_so_far[i+1]]:
            max_so_far[i] = i
        else:
            max_so_far[i] = max_so_far[i+1]

    for i in range(1, n-1):
        if a[i] > a[mini] and a[i] > a[max_so_far[i+1]]:
            print(3)
            print(mini+1, i+1, max_so_far[i+1]+1)
            return
        elif a[i] < a[maxi] and a[i] < a[min_so_far[i+1]]:
            print(3)
            print(maxi+1, i+1, min_so_far[i+1]+1)
            return
        if a[mini] > a[i]:
            mini = i
        if a[maxi] < a[i]:
            maxi = i
    print(0)
    return


if __name__=='__main__':
    solve()
