#include <bits/stdc++.h>
using namespace std;
const int Mod = 998244353;
int fpow(int x, int y) {
  int res = 1;
  while (y) {
    if (y & 1) res = 1ll * res * x % Mod;
    x = 1ll * x * x % Mod;
    y >>= 1;
  }
  return res;
}
const int MAX_N = 4e6 + 5;
int N, M, fac[MAX_N], ifc[MAX_N];
int C(int n, int m) { return 1ll * fac[n] * ifc[m] % Mod * ifc[n - m] % Mod; }
int main() {
  cin >> N >> M;
  for (int i = fac[0] = 1; i <= N; i++) fac[i] = 1ll * fac[i - 1] * i % Mod;
  ifc[N] = fpow(fac[N], Mod - 2);
  for (int i = N - 1; ~i; i--) ifc[i] = 1ll * ifc[i + 1] * (i + 1) % Mod;
  int ans = 0;
  for (int i = 1; i <= N; i++) {
    int res =
        1ll * C(N, i) * (1ll * M * ifc[i] % Mod * fac[i - 1] % Mod + 1) % Mod;
    if (i & 1)
      ans = (ans + res) % Mod;
    else
      ans = (ans + Mod - res) % Mod;
  }
  ans = 1ll * ans * (N + M + 1) % Mod * fpow(M + 1, Mod - 2) % Mod;
  printf("%d\n", ans);
  return 0;
}
