#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
const int MAXN = 2000100;
const int INF = 2147483600;
const long long Mod = 998244353LL;
int N, M;
long long inv[MAXN + 1], ans = 0;
inline void Add(long long &a, long long b) {
  a = (a + b >= Mod ? a + b - Mod : a + b);
}
inline long long Pow(long long a, long long b) {
  long long ret = 1;
  for (; b; b >>= 1, a = a * a % Mod)
    if (b & 1) ret = ret * a % Mod;
  return ret;
}
int main() {
  N = read(), M = read();
  long long In = (N + M + 1) * Pow(M + 1, Mod - 2) % Mod;
  long long C = 1;
  inv[1] = 1;
  for (int i = 2; i <= N; i++)
    inv[i] = (Mod - (Mod / i) * inv[Mod % i] % Mod) % Mod;
  for (int i = 1; i <= N; i++) {
    C = C * (N - i + 1) % Mod * inv[i] % Mod;
    Add(ans, ((i & 1) ? C * (M + i) % Mod * inv[i] % Mod
                      : Mod - C * (M + i) % Mod * inv[i] % Mod));
  }
  printf("%lld\n", ans * In % Mod);
  return 0;
}
