{"raw_statement":[{"iden":"problem statement","content":"We have a polynomial of degree $N$, $A(x)=A_Nx^N+A_{N-1}x^{N-1}+\\cdots +A_1x+A_0$,  \nand another of degree $M$, $B(x)=B_Mx^M+B_{M-1}x^{M-1}+\\cdots +B_1x+B_0$.  \nHere, each coefficient of $A(x)$ and $B(x)$ is an integer whose absolute value is at most $100$, and the leading coefficients are not $0$.\nAlso, let the product of them be $C(x)=A(x)B(x)=C_{N+M}x^{N+M}+C_{N+M-1}x^{N+M-1}+\\cdots +C_1x+C_0$.\nGiven $A_0,A_1,\\ldots, A_N$ and $C_0,C_1,\\ldots, C_{N+M}$, find $B_0,B_1,\\ldots, B_M$.  \nHere, the given inputs guarantee that there is a unique sequence $B_0, B_1, \\ldots, B_M$ that satisfies the given conditions."},{"iden":"constraints","content":"*   $1 \\leq N < 100$\n*   $1 \\leq M < 100$\n*   $|A_i| \\leq 100$\n*   $|C_i| \\leq 10^6$\n*   $A_N \\neq 0$\n*   $C_{N+M} \\neq 0$\n*   There is a unique sequence $B_0, B_1, \\ldots, B_M$ that satisfies the conditions given in the statement."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $M$\n$A_0$ $A_1$ $\\ldots$ $A_{N-1}$ $A_N$\n$C_0$ $C_1$ $\\ldots$ $C_{N+M-1}$ $C_{N+M}$"},{"iden":"sample input 1","content":"1 2\n2 1\n12 14 8 2"},{"iden":"sample output 1","content":"6 4 2\n\nFor $A(x)=x+2$ and $B(x)=2x^2+4x+6$, we have $C(x)=A(x)B(x)=(x+2)(2x^2+4x+6)=2x^3+8x^2+14x+12$, so $B(x)=2x^2+4x+6$ satisfies the given conditions. Thus, $B_0=6$, $B_1=4$, $B_2=2$ should be printed in this order, with spaces in between."},{"iden":"sample input 2","content":"1 1\n100 1\n10000 0 -1"},{"iden":"sample output 2","content":"100 -1\n\nWe have $A(x)=x+100$, $C(x)=-x^2+10000$, for which $B(x)=-x+100$ satisfies the given conditions. Thus, $100$, $-1$ should be printed in this order, with spaces in between."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}