Score Calculation

Time limit1sMemory limit128 MB

Problem

A contestant worked on 8 problems, and the score earned for each problem is given. A problem that was not solved has a score of 0. The contestant's final score is the sum of the 5 highest scores among the 8 scores.

Given the scores for all 8 problems, compute the final score and the problem numbers that contribute to it.

Input

The input consists of 8 lines. The i-th line contains the score for problem i. Each score is an integer between 0 and 150 inclusive, and all 8 scores are distinct.

Output

Print the sum of the 5 highest scores on the first line. On the second line, print the problem numbers corresponding to those 5 scores, separated by spaces. The problem numbers must be printed in increasing order.