from itertools import combinations N = int(input()) K = list(map(int, input().split())) dp = [False]*(1<>i)&1: idx.append(i) for a, b, c in combinations(idx, 3): if (K[a]K[c]) or (K[a]>K[b] and K[b]K[c]) or (K[a]>K[b] and K[b]