#pragma GCC target("avx2") #pragma GCC optimize("Ofast") #pragma GCC optimize("unroll-loops") #include using namespace std; #include #include typedef atcoder::static_modint<754974721> mint; int main(){ int n, m; cin >> n >> m; vector a(n), b(n), c(n); vector x(m), y(m), z(m); for (int i=0; i> a[i] >> b[i] >> c[i]; } for (int i=0; i> x[i] >> y[i] >> z[i]; } vector f(201 * 201 * 201); vector g(201 * 201 * 201); for (int i=0; i h = atcoder::convolution(f, g); int ans = 0; for (int i=0; i