Ministry of Truth
Winston John works in the Ministry of Truth. Recently he was promoted to the head of the department, which deals with the journal "Informatics and Life". In connection with the changed political situation, all issues of the journal should be urgently brought into line with the current reality.
In subordinate, John has three employees of the ministry, between whom he is going to divide all the work. In order to avoid confusion, John wants to assign a first issues of the magazine to the first, b to the second and c to the last third employee. At the same time, each employee must get at least one issue. Since similar works are being conducted not for the first time, for every issue of the magazine it is known how many minutes it takes to bring its content into line with the political situation.
The task will be executed when each employee finishes making changes. If the employee copes with his part before the rest, then the remaining time he can use at his discretion. Let the minimum and maximum time spent by employees to perform their work is T[min]
and T[max]
respectively. The task will be executed in the time T[max]
, and the maximum amount of free time that his subordinates will have is T[max]
- T[min]
.
John believes that a large amount of free time is bad for the morale of subordinates. Help John to distribute the work so that the value of T[max]
- T[min]
will be minimal.
Input
First line contains one integer n (3 ≤ n ≤ 100000) - number of journal issues. Second line contains n integers t[1]
, t[2]
, ..., t[n]
(0 ≤ t[1]
, t[2]
, ..., t[n]
≤ 10^9
) - the number of minutes that a Truth Ministry employee will need to make a change to the corresponding issue of the journal.
Output
Print space separated the numbers a, b and c (a + b + c = n, a, b, c > 0) - the number of issues of the journal, that should be assigned to first, second and third employees. If there are several answers, output any.