Two robots travelling across an ancient wilderness uncover a buried four-function calculator. Its display is built from three seven-segment LED digits, and every calculation is done on integers (truncating where needed), so there is no decimal point.

Each digit lights a fixed number of segments:
| Digit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
|---|---|---|---|---|---|---|---|---|---|---|
| Segments | 6 | 2 | 5 | 5 | 4 | 5 | 6 | 3 | 7 | 6 |
Rules for what the display shows:
An ammeter on the display reads the total current, and every lit segment draws 5 mA. So the current of a number is 5 mA times (the sum of the segment counts of its digits, plus 1 if the number is negative). For example:
You are given three current readings X, Y, and Z (in mA): the current of the first operand, of the second operand, and of the result. The operation Op is unknown and may be any of +, -, *, or / (division truncates toward zero, and division by zero is not allowed).
Count how many distinct expressions a Op b = c satisfy all of the following:
a Op b = c holds, and the result c stays within -999 to 999 (expressions whose result leaves this range are not counted).Two expressions are different when they differ in the first operand, the operation, or the second operand.
The input contains several test cases. Each case is a single line with three integers X, Y, and Z (0 ≤ X, Y, Z ≤ 999), separated by single spaces: the currents in mA of the first operand, the second operand, and the result. The input ends with a line that contains the single value 0.
No number is ever written with a leading zero, whether as an operand or as a result. For each test case, print one line that states how many valid expressions exist and echoes the three readings, in exactly this form:
<count> solutions for X Y Z
Use the singular word solution only when the count is exactly 1 (for example, 1 solution ...); use solutions for every other count, including 0.
For the readings 80 35 100, one valid expression is 925 - 117 = 808: 925 draws 80 mA, 117 draws 35 mA, and 808 draws 100 mA. Not every input has a match — the readings 35 10 10, for instance, admit no valid expression. For each case, find every valid expression and report the total count.