#include <bits/stdc++.h>
const int mod = 998244353;
int n, m, ans;
int pow(int x, int k) {
  int s = 1;
  for (; k; k >>= 1, x = 1ll * x * x % mod)
    if (k & 1) s = 1ll * s * x % mod;
  return s % mod;
}
int inv(int x) { return pow(x, mod - 2); }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) (ans += inv(i)) %= mod;
  printf("%lld\n",
         (1ll * ans * m + 1) % mod * (1ll * n * inv(m + 1) % mod + 1) % mod);
}
