def ntt_convolute(a, b):
 assert (len(a) == len(b))
 x = ntt(a, 1)
 y = ntt(b, 1)
 for i in range(len(a)):
  y[i] = (y[i] * x[i])
 r = ntt(y, (-1))
 return r

def ntt_convolute ( a , b ) : assert ( len ( a ) == len ( b ) ) x = ntt ( a , 1 ) y = ntt ( b , 1 ) for i in range ( len ( a ) ) : y [ i ] = ( y [ i ] * x [ i ] ) r = ntt ( y , ( - 1 ) ) return r
convolute arrays a and b .