On each tickets issued in public transport in Kazaan, $$$6$$$ digits number is printed. To pass the time of the trip, young Aliya often plays a game like this: she tries to place arithmetic operations and brackets between the numbers on the ticket number so that the result is an expression equal to $$$100$$$. At the same time, the numbers between which no operations and brackets were inserted are glued into one number. Aliya has a few rules:
Formally, the expression that Aliya can get must satisfy the following grammar:
Here are examples of some correct expressions, as well as the numbers to which they are equal: 2*(3+4) $$$= 14$$$, 0+0 $$$= 0$$$, -{}-239-{}-179 $$$= (-(-239)) - (-179) = 239 + 179 = 418$$$, (17+13)/6 $$$= 5$$$, 0/10 $$$= 0$$$ (zero can be divided), -(21+12) $$$= -33$$$, (((8))*(9)) $$$= 72$$$.
Here are examples of some incorrect expressions: 2(3+4), 2**2, -239-179-, 17+13/6 (because $$$13$$$ cannot be divided by $$$6$$$), 10/0 (you cannot divide by zero), 0/0 (even so), 1+().
Aliya asks you to help her find such expressions for all possible ticket numbers. She understands that you may not be able to find expressions for all numbers. And for some numbers such expressions do not exist at all. However, the more numbers for which you find the desired expression, the better.
The input consists of several lines. Each line contains $$$6$$$ digits, the ticket number.
For each ticket number print the desired expression, or «No solution», if such an expression does not exist or you could not find it.
123456 987654 111111 000000 001000
1+(2+3+4)*(5+6) 9+87+(6-5)*4 (111-11)/1 No solution 0+0+100+0
There is only one test in this task, except for an example. It lists all ticket numbers in ascending order. For each number, you should output the correct expression or the string «No solution». Otherwise, you will receive $$$0$$$ points.
If the output format is correct, your output will be evaluated based on the number of numbers for which you have found the desired expression. Let $$$x$$$ be the number of numbers for which you have found the desired expression, and $$$T$$$ be the number of numbers for which such an expression exists.
The points for your output is $$$\lfloor score (x) \rfloor$$$, where $$$score$$$ is a piecewise linear function, the break points of which are the points $$$(0, 0)$$$, $$$(5, 5)$$$, $$$(55, 10)$$$, $$$(555, 15)$$$, $$$(5555, 20)$$$, $$$(55555, 25)$$$, $$$(T - 55555, 75)$$$, $$$(T - 5555, 80)$$$, $$$(T - 555, 85)$$$, $$$(T - 55, 90)$$$, $$$(T - 5, 95)$$$, $$$(T, 100)$$$.
Formally, $$$score(x)$$$ can be calculated as follows:
| $$$x$$$ | $$$score(x)$$$ | |
| $$$0 \le x | lt; 5$$$ | $$$x$$$ |
| $$$5 \le x | lt; 55$$$ | $$$5 + \frac{x - 5}{10}$$$ |
| $$$55 \le x | lt; 555$$$ | $$$10 + \frac{x - 55}{100}$$$ |
| $$$555 \le x | lt; 5\,555$$$ | $$$15 + \frac{x - 555}{1\,000}$$$ |
| $$$5\,555 \le x | lt; 55\,555$$$ | $$$20 + \frac{x - 5\,555}{10\,000}$$$ |
| $$$55\,555 \le x | lt; T - 55\,555$$$ | $$$25 + 50 \cdot \frac{x - 55\,555}{T - 55\,555 \cdot 2}$$$ |
| $$$T - 55\,555 \le x | lt; T - 5\,555$$$ | $$$75 + \frac{x - (T - 55\,555)}{10\,000}$$$ |
| $$$T - 5\,555 \le x | lt; T - 555$$$ | $$$80 + \frac{x - (T - 5\,555)}{1\,000}$$$ |
| $$$T - 555 \le x | lt; T - 55$$$ | $$$85 + \frac{x - (T - 555)}{100}$$$ |
| $$$T - 55 \le x | lt; T - 5$$$ | $$$90 + \frac{x - (T - 55)}{10}$$$ |
| $$$T - 5 \le x \le T$$$ | $$$95 + (x - (T - 5))$$$ |
| Name |
|---|


