A transposition of a deck of cards is the following sequence of operations:
Throw away an arbitrary number of cards from the top of the deck (it is allowed to throw away no cards, or to throw away all cards);
Pick a number ;
Divide the remaining part of the deck into parts. Part number () consists of cards which have been in positions such that . In each part, cards are arranged in the same way as they were arranged in the original deck.
Transpose each of the parts. We can transpose the parts in any order, but we can start transposing the next part only after completely transposing the previous one (for example, if is split into and , then we transpose and split it into and , then we have to transpose both and (in any order) before proceeding to transposing ).
You are given a deck of cards with numbers. You can look at the cards, so you know all numbers on all cards. Your task is to find a transposition which gives the greatest amount of points. We get 1 point whenever the sum of the cards thrown away so far is divisible by 100. If two transpositions give the same score, the one in which the first card thrown away has a lower value is better. If we still have a draw, the second card decides, and so on.
The first line contains a single number — how many cards there are in the deck ().
The -th row, , contains a single integer , which is the value of the -th card ().
In the first row output the score (the number of points received). In the second row output , where is the -th card thrown away when using the optimal way of transposing the deck.
Input
9 80 50 20 90 40 30 70 60 10
Output
3 40 60 50 20 30 10 90 70 80