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.
import itertools
import math
import time
from builtins import input
from math import gcd as gcd
import sys
import queue
import itertools
import collections
from heapq import heappop, heappush
import random
import os
from random import randint
import decimal

# from sys import stdin, stdout
# input, print = stdin.readline, stdout.write

decimal.getcontext().prec = 18


def solve():
    n = int(input())
    a = list(map(int, input().split()))

    # saving not value but indexes
    pref_min = [0 for i in range(n)]
    suff_min = [n - 1 for i in range(n)]

    pref_max = [0 for i in range(n)]
    suff_max = [n - 1 for i in range(n)]

    for i in range(1, n):
        pref_max[i] = pref_max[i - 1]
        pref_min[i] = pref_min[i - 1]

        if a[i] > a[pref_max[i]]:
            pref_max[i] = i
        if a[i] < a[pref_min[i]]:
            pref_min[i] = i

    for i in range(n - 2, -1, -1):
        suff_max[i] = suff_max[i + 1]
        suff_min[i] = suff_min[i + 1]

        if a[i] > a[suff_max[i]]:
            suff_max[i] = i
        if a[i] < a[suff_min[i]]:
            suff_min[i] = i

    for i in range(1, n - 1):
        if a[pref_min[i - 1]] < a[i] > a[suff_min[i + 1]]:
            print(3)
            print(pref_min[i - 1] + 1, i + 1, suff_min[i + 1] + 1)
            return

        if a[pref_max[i - 1]] > a[i] < a[suff_max[i + 1]]:
            print(3)
            print(pref_max[i - 1] + 1, i + 1, suff_max[i + 1] + 1)
            return

    print(0)


if __name__ == '__main__':
    multi_test = 0

    if multi_test == 1:
        t = int(sys.stdin.readline())
        for _ in range(t):
            solve()
    else:
        solve()
