#include using namespace std; using ll = long long; #define all(a) (a).begin(), (a).end() #define pb push_back #define fi first #define se second mt19937_64 rng(chrono::system_clock::now().time_since_epoch().count()); const ll MOD1000000007 = 1000000007; const ll MOD998244353 = 998244353; const ll MOD[3] = {999727999, 1070777777, 1000000007}; const ll LINF = 1LL << 60LL; const int IINF = (1 << 30) - 2; #include using namespace atcoder; using mint = modint998244353; mint combination(int n, int k){ mint res = 1; for(int i=0; i> k; int n = 0; vector l(k), m(k); for(int i=0; i> l[i] >> m[i]; n += l[i]*m[i]; } mint ans = 1; for(int i=0; i> T; while(T--) solve(); }