#D4633. Convolution
Convolution
Convolution
You are given two integer arrays a_0, a_1, ..., a_{N - 1} and b_0, b_1, ..., b_{M - 1}. Calculate the array c_0, c_1, ..., c_{(N - 1) + (M - 1)}, defined by c_i = \sum_{j = 0}^i a_j b_{i - j} \bmod 998244353.
Constraints
- 1 \leq N, M \leq 524288
- 0 \leq a_i, b_i < 998244353
- All values in Input are integer.
Input
Input is given from Standard Input in the following format:
N M a_0 a_1 ... a_{N-1} b_0 b_1 ... b_{M-1}
Output
Print the answer in the following format:
c_0 c_1 ... c_{(N - 1) + (M - 1)}
Output
Print the answer in the following format:
c_0 c_1 ... c_{(N - 1) + (M - 1)}
Examples
Input
4 5 1 2 3 4 5 6 7 8 9
Output
5 16 34 60 70 70 59 36
Input
1 1 10000000 10000000
Output
871938225
inputFormat
Input are integer.
Input
Input is given from Standard Input in the following format:
N M a_0 a_1 ... a_{N-1} b_0 b_1 ... b_{M-1}
outputFormat
Output
Print the answer in the following format:
c_0 c_1 ... c_{(N - 1) + (M - 1)}
Output
Print the answer in the following format:
c_0 c_1 ... c_{(N - 1) + (M - 1)}
Examples
Input
4 5 1 2 3 4 5 6 7 8 9
Output
5 16 34 60 70 70 59 36
Input
1 1 10000000 10000000
Output
871938225
样例
4 5
1 2 3 4
5 6 7 8 9
5 16 34 60 70 70 59 36