A. Robot Production
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

The artificial intelligence module GAIA, named HEPHAESTUS, has developed significantly and is actively engaged in the production of machines using the resources of the system it is embedded in. After Beta released HEPHAESTUS into the computer network "Distant Zenith", it immediately devised a plan to produce $$$n$$$ machines, each of which requires $$$a_i$$$ units of resources for production.

To optimize the process, the AI found a way to save exactly one unit of resources for every 100 units used in the production of each individual machine. In other words, from the production of a machine with a cost of $$$a_i$$$, $$$\left\lfloor \frac{a_i}{100} \right\rfloor$$$ units of resources can be saved.

In order to further optimize the production of machines, HEPHAESTUS has organized the possibility of producing machines in pairs. If machines $$$i$$$ and $$$j$$$ are produced as a pair, $$$\left\lfloor \frac{a_i + a_j}{100} \right\rfloor$$$ units of resources will be saved.

Determine which machines should be paired together in order to save as many resources as possible. Among all the ways to save the maximum amount of resources, choose the one with the fewest number of machines paired together and the most machines produced independently.

Input

The first line of input contains an integer $$$n$$$ - the number of machines to be produced ($$$1 \leqslant n \leqslant 2 \cdot 10^5$$$).

The second line contains $$$n$$$ integers $$$a_1$$$, ..., $$$a_n$$$ - the amount of resources required to produce each machine ($$$1 \leqslant a_i \leqslant 10^9$$$).

Output

In the first line, output a single integer $$$t$$$ - the maximum amount of resources that can be saved.

In the second line, output an integer $$$k$$$ - the minimum number of machine pairings required to achieve this.

In the next $$$k$$$ lines, output pairs of machine numbers that should be paired together during production.

If there are multiple possible answers with the given $$$t$$$ and $$$k$$$, output any of them.

Scoring

Points for each subtask are awarded only if all the tests of that subtask and the necessary subtasks, as well as the tests from the statement, are passed successfully.

SubtaskPoints Additional Constraints Required Subtasks Test Information
18$$$n \leqslant 3$$$–full
214all $$$a_i$$$ are equal–full
314$$$a_i \leqslant 50$$$ for all $$$i$$$–full
418$$$n \leqslant 15$$$1full
520$$$n \leqslant 1000$$$4full
626none1 – 5first error
Examples
Input
3
30 120 190
Output
3
1
2 3
Input
6
100 4 197 324 690 500
Output
18
2
2 3
4 5