Beautiful numbers
You probably noticed that many companies use "beautiful" phone numbers for advertising that are convenient for potential customers to remember. But what if your company number is unremarkable? You can take a closer look at it, and suddenly, if you rearrange the numbers in some way, the number will become much more beautiful? For example, if your company has the number 872-73-33, then it can be made more beautiful if you rearrange the numbers like this: 8727-333.
Let us introduce the following value of the beauty of partitioning a number. We will break the number with hyphens into groups of sizes from 2 to 4 digits. Now, the beauty of the partition is the sum of the points that each group brings. We will consider these points using the following table.
In this table, the symbols "a", "b", "c" indicate different numbers. For example, the groups "223", "667" are suitable for the template "aab", but "123" and "888" are not suitable.
Using the proposed evaluation, find the most beautiful partition of the given number.
Input
Contains one line with 7 digits - the given phone number.
Output
Print in the first line the most beautiful partition of the number, and in the second - the value of its beauty. If there are several partitions with the maximum value of beauty, output any of them.