A sequence of length and an integer are given.
For each , consider a new sequence obtained by inserting one after the -th position of sequence .
That is,
- If , insert before .
- If , insert between and .
- If , insert after .
Let be the sequence of length obtained in this way. For each , print the area of the largest rectangle that is contained in the histogram made from .
Input
The input is given in the following format.
Output
Print a total of lines.
On the -th line, print the area of the largest rectangle that is contained in the histogram made from .
Constraints
- .
- .
- .
Subtasks
Samples
입력
3 2
1 3 2
출력
4
6
6
6