#include <bits/stdc++.h>
using namespace std;
const int mo = 998244353;
const int N = 5000005;
int fac[N], inv[N];
int f[N], p[N], n, m, ans;
int power(int x, int y) {
  int s = 1;
  for (; y; y /= 2, x = 1ll * x * x % mo)
    if (y & 1) s = 1ll * s * x % mo;
  return s;
}
void init() {
  fac[0] = inv[0] = inv[1] = 1;
  for (int i = (int)(2); i <= (int)(N - 1); i++)
    inv[i] = 1ll * inv[mo % i] * (mo - mo / i) % mo;
  for (int i = (int)(1); i <= (int)(N - 1); i++)
    inv[i] = 1ll * inv[i - 1] * inv[i] % mo;
  for (int i = (int)(1); i <= (int)(N - 1); i++)
    fac[i] = 1ll * fac[i - 1] * i % mo;
}
int C(int x, int y) {
  if (x < 0 || y < 0 || y > x) return 0;
  return 1ll * fac[x] * inv[y] % mo * inv[x - y] % mo;
}
int IC(int x, int y) {
  if (x < 0 || y < 0 || y > x) return 0;
  return 1ll * inv[x] * fac[y] % mo * fac[x - y] % mo;
}
int main() {
  init();
  scanf("%d%d", &n, &m);
  for (int i = (int)(0); i <= (int)(n); i++)
    p[i] = 1ll * IC(n + m, n) * C(n - i + m - 1, n - i) % mo;
  int sum = 0;
  for (int i = (int)(1); i <= (int)(n); i++) {
    int k = 1, b = 0;
    b = (b + mo - 1ll * sum * IC(i + m, m) % mo) % mo;
    k = (k + mo - 1ll * C(i + m - 1, m - 1) * IC(i + m, m) % mo) % mo;
    b = (b + mo - 1ll * power(m + 1, mo - 2) * n % mo - 1) % mo;
    f[i] = 1ll * (mo - b) * power(k, mo - 2) % mo;
    sum = (sum + 1ll * C(i + m - 1, m - 1) * f[i]) % mo;
  }
  cout << f[n] << endl;
}
