#include <bits/stdc++.h>
using namespace std;
const int MX = 4000005, mod = 998244353;
long long n, m, inv[MX];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  inv[0] = inv[1] = 1;
  for (long long i = 2; i < MX; i++)
    inv[i] = inv[mod % i] * (mod - mod / i) % mod;
  cin >> n >> m;
  long long P = 0, Q = 1, acu = 1;
  for (long long i = 0; i < n; i++) {
    long long c = acu * m % mod * inv[n - i + m] % mod;
    (P += c * (i + 1)) %= mod;
    (Q += m * inv[i + 1]) %= mod;
    (acu *= (n - i) * inv[n - i + m] % mod) %= mod;
  }
  (P += acu * (n + 1)) %= mod;
  cout << P * Q % mod << '\n';
  return 0;
}
