An $n$-element permutation is an $n$-element sequence consisting of distinct numbers from the set $\{1, 2, \dots, n\}$. For example, the sequence 2, 1, 4, 5, 3 is a 5-element permutation.
In permutations of numbers, we are interested in the longest increasing subsequences. In the example permutation, they have a length of 3, and there are exactly two such subsequences: 2, 4, 5 and 1, 4, 5.
A supernumber is any number that belongs to at least one of the longest increasing subsequences. In the permutation 2, 1, 4, 5, 3, the supernumbers are 1, 2, 4, 5, while the number 3 is not a supernumber.
Your task is to find all supernumbers for a given permutation.
Task
Write a program that:
- reads the permutation from standard input,
- finds all supernumbers,
- prints the found supernumbers to standard output.
Input
The input consists of two lines. The first line contains a single integer $n$, $1 \le n \le 100\,000$. The second line contains $n$ numbers forming an $n$-element permutation, separated by single spaces.
Output
The output should consist of two lines. The first line should contain a single integer $m$ — the number of supernumbers in the input permutation. The second line should contain the supernumbers separated by single spaces, listed in increasing order.
Examples
Input 1
5 2 1 4 5 3
Output 1
4 1 2 4 5