#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e6 + 5, Mod = 998244353;
char buf[1 << 12], *pp1 = buf, *pp2 = buf, nc;
int ny;
inline char gc() {
  return pp1 == pp2 &&
                 (pp2 = (pp1 = buf) + fread(buf, 1, 1 << 12, stdin), pp1 == pp2)
             ? EOF
             : *pp1++;
}
inline int read() {
  int x = 0;
  for (ny = 1; nc = gc(), (nc < 48 || nc > 57) && nc != EOF;)
    if (nc == 45) ny = -1;
  if (nc < 0) return nc;
  for (x = nc - 48; nc = gc(), 47 < nc && nc < 58 && nc != EOF;
       x = (x << 3) + (x << 1) + (nc ^ 48))
    ;
  return x * ny;
}
int Inv[MAXN], n, m;
int main() {
  n = read(), m = read();
  Inv[1] = 1;
  for (int i = 2; i <= max(n, m + 1); i++)
    Inv[i] = 1ll * Inv[Mod % i] * (Mod - Mod / i) % Mod;
  int ans = 1;
  for (int i = 1; i <= n; i++) ans = (ans + 1ll * Inv[i] * m) % Mod;
  cout << 1ll * ans * (1ll * Inv[m + 1] * n % Mod + 1) % Mod << "\n";
  return 0;
}
