Multiplication of Polynomials
Given two polynomials in x, your task is to output their product. The degrees of these polynomials do not exceed 10, and their coefficients are within 10000 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 1, it is not written before x, except when it is the constant term. If the exponent is 1, 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 x.
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.