Multiplication of Polynomials#3658

Multiplication of Polynomials

1 second
64 megabytes
Very easy

Given two polynomials in , your task is to output their product. The degrees of these polynomials do not exceed , and their coefficients are within in absolute value.

The polynomials are provided in symbolic form, with no spaces in the expression. As shown in the examples, the symbol "^" is used for exponentiation. If the coefficient is , it is not written before , except when it is the constant term. If the exponent is , both the exponent and the exponentiation sign are omitted. A monomial with a zero coefficient is omitted unless it is the only monomial in the polynomial.

The output should be the product of the two polynomials, with like terms combined and arranged in descending order of the degree of .

Input

The first line contains the first polynomial, and the second line contains the second polynomial.

Output

Output a single line containing the product of the two polynomials.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading