mod = 998244353 n = 505050 fact = [1] * (n + 1) invfact = [1] * (n + 1) for i in range(1, n): fact[i + 1] = ((i+1) * fact[i]) % mod invfact[n] = pow(fact[n], mod - 2, mod) for i in range(n - 1, -1, -1): invfact[i] = invfact[i + 1] * (i + 1) % mod def comb(n, r): if n < 0 or r < 0 or n - r < 0: return 0 return fact[n] * invfact[r] * invfact[n - r] % mod H, W = map(int, input().split()) ans = 0 for k1 in range(H + 1): for k2 in range(W + 1): ans += comb(k1, H - k1) * comb(k2, W - k2) * comb(k1 + k2, k1) ans %= mod print(ans)