#include <bits/stdc++.h>
using namespace std;
const int M = 998244353;
const int N = 4000005;
int n, m, i, j, k;
long long fac[N], inv[N], dp[N], x[N], y[N], s, s2, s1;
long long qpow(long long a, long long b) {
  long long s = a, ans = 1;
  while (b) {
    if (b & 1) ans = ans * s % M;
    s = s * s % M;
    b >>= 1;
  }
  return ans;
}
int main() {
  scanf("%d %d", &n, &m);
  fac[0] = 1;
  for (i = 1; i <= n + m; ++i) fac[i] = fac[i - 1] * i % M;
  inv[n + m] = qpow(fac[n + m], M - 2);
  for (i = n + m - 1; i >= 0; --i) inv[i] = inv[i + 1] * (i + 1) % M;
  for (i = 0; i <= n; ++i) x[i] = inv[n - i] * fac[n + m - i - 1] % M;
  s2 = s1 = x[n];
  for (i = n - 1; i >= 0; --i) {
    s1 = (s1 + x[i]) % M;
    s2 = (s2 + s1) % M;
    dp[i] = m * fac[i] % M * fac[n - i] % M *
            (inv[n + m - i] * inv[i] % M * (s + s2) % M +
             (i == 0 ? 0 : inv[n + m - i + 1] * inv[i - 1] % M * s2 % M)) %
            M;
    dp[i] = dp[i] * qpow(1 - m * qpow(n + m - i, M - 2) % M, M - 2) % M;
    s = (s + dp[i] * x[i]) % M;
  }
  cout << (dp[0] % M + M) % M << endl;
}
