An educational software company, All Computer Math (ACM), has a section on multiplication of integers. They want to display calculations in the traditional grade school format, like the following computation of 432 \times 5678:
432
× 5678
-------
3456
3024
2592
2160
-------
2452896Note that the final product is printed without any leading spaces, but leading spaces are needed on some other lines to maintain alignment. According to our regional rules, there should never be any lines with trailing white space. The lines of dashes have a length matching the final product.
As a special case, when one of the digits in the second operand is a zero, it generates a single in the partial answers and the next partial result should be on the same line, not the next line down. For example, consider the product 200001 \times 90040:
200001
× 90040
-----------
8000040
180000900
-----------
18008090040The rightmost digit of the second operand is , placing a in the rightmost column of the first partial product. Instead of moving to a new line, the partial product of 4 \times 200001 is placed on the same line as that . The third and fourth least-significant digits of the second operand are also zeros, each resulting in a in the second partial product on the same line as 9 \times 200001.
In the final special case, if there is only one line in the partial answer, it is the full answer so there is no need to compute a sum. For example, 246 \times 70 would be formatted as:
246
× 70
-----
17220Your job is to generate such displays for these multiplications.
The input consists of one or more data sets. Each data set consists of two positive integers on a line, specifying the operands in the desired order. Neither number will have more than digits, and neither will have leading zeros. After the last data set there is a line containing only .
For each data set, output a label line containing "Problem " with the number of the problem, followed by the complete multiplication problem in accordance with the format rules described.
Warning: A standard int type cannot properly handle -digit numbers. You should use a -bit type (e.g., long in Java or long long in C++).
Example 1