#include #include using namespace std; #include #include using mint = atcoder::modint998244353; template struct acl_fac { std::vector facs, facinvs; acl_fac(int N) { assert(-1 <= N and N < modint::mod()); facs.resize(N + 1, 1); for (int i = 1; i <= N; i++) facs[i] = facs[i - 1] * i; facinvs.assign(N + 1, facs.back().inv()); for (int i = N; i > 0; i--) facinvs[i - 1] = facinvs[i] * i; } modint ncr(int n, int r) const { if (n < 0 or r < 0 or n < r) return 0; return facs[n] * facinvs[r] * facinvs[n - r]; } modint operator[](int i) const { return facs[i]; } modint finv(int i) const { return facinvs[i]; } }; acl_fac fac(1000000); auto gen(int H) { vector ret(H + 1); for (int n = (H + 1) / 2; n <= H; ++n) { int n2 = H - n; ret.at(n) = fac.finv(n - n2) * fac.finv(n2); } return ret; } int main() { int H, W; cin >> H >> W; auto f = gen(H), g = gen(W); auto vec = atcoder::convolution(f, g); auto ret = vec.front(); for (int i = 1; i < int(vec.size()); ++i) ret += vec.at(i) * fac[i]; cout << ret.val() << endl; }