User's AC Ratio

93.8% (30/32)

Submission's AC Ratio

29.6% (40/135)

Description

In high school mathematics, there are lots of situations to deal with the multiplication of polynomials, and sometimes it would be a little bit annoying. Now, since you have learnt programming, please write a program that helps you to make such annoying things easy.

Input Format

First line of input are two numbers $n \ m$, which represent the length of following polynomials. ($1 \leq n, m \leq 10$)
Following are two lines of numbers $a_0, a_1 \dots a_{n-1}$ and $b_0, b_1, \dots b_{m-1}$, which represent the coeffecients (where $a_i, b_i$ are the coeffecient of term $x^ \wedge i$, and $-100 \leq a_i, b_i \leq 100$) in the polynomials respectively.

Output Format

A single line $c_0 \ c_1x \ c_2x ^ \wedge 2 \ \dots$ which represents the result of multiplication of given polynomials in ascending order.
Notice that you do not need to print out term $x^ \wedge i$ if $c_i = 0$, and there is a single space between each term.

Sample Input 1

2 2
1 1
-1 1

Sample Output 1

-1 1x^2

Hints

Problem Source

Subtasks

No. Testdata Range Score
1 0~6 20

Testdata and Limits

No. Time Limit (ms) Memory Limit (KiB) Output Limit (KiB) Subtasks
0 1000 65536 65536 1
1 1000 65536 65536 1
2 1000 65536 65536 1
3 1000 65536 65536 1
4 1000 65536 65536 1
5 1000 65536 65536 1
6 1000 65536 65536 1