#include <bits/stdc++.h>
using namespace std;
const int N = 4e6, M = N + 10, mod = 998244353;
inline int add(int a, int b) { return a + b >= mod ? a + b - mod : a + b; }
inline int sub(int a, int b) { return a >= b ? a - b : a - b + mod; }
inline int mul(int a, int b) { return 1ll * a * b % mod; }
inline int I(int x) { return x & 1 ? sub(mod, 1) : 1; }
int fac[M], ifac[M], inv[M];
inline void prework(int n) {
  fac[0] = fac[1] = inv[0] = inv[1] = ifac[0] = ifac[1] = 1;
  for (int i = 2; i <= n; i++) fac[i] = mul(fac[i - 1], i);
  for (int i = 2; i <= n; i++) inv[i] = mul(sub(mod, mod / i), inv[mod % i]);
  for (int i = 2; i <= n; i++) ifac[i] = mul(ifac[i - 1], inv[i]);
}
inline int C(int n, int m) { return mul(fac[n], mul(ifac[m], ifac[n - m])); }
int n, m;
int main() {
  ios::sync_with_stdio(false);
  prework(N);
  cin >> n >> m;
  int T = 0, last = 0, ans = 0;
  for (int i = 1; i <= n + 1; i++) {
    int now = mul(m, mul(inv[m + n - i + 1], sub(1, last)));
    last = add(last, now);
    T = add(T, mul(i, now));
  }
  for (int i = 1; i <= n; i++)
    ans = add(ans, mul(I(i - 1), mul(i + m, mul(inv[i], C(n, i)))));
  cout << mul(T, ans) << endl;
  return 0;
}
