#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
long long inv[2000005];
int main() {
  inv[1] = 1ll;
  for (int i = 2; i < 2000005; i++)
    inv[i] = inv[mod % i] * 1ll * (mod - (mod / i)) % mod;
  int n, m;
  cin >> n >> m;
  long long harmonic = 0ll;
  for (int i = 1; i <= n; i++) (harmonic += inv[i]) %= mod;
  long long ans = ((m * 1ll * harmonic) + 1ll) % mod;
  ans = (ans * ((n * inv[m + 1]) % mod + 1ll) % mod) % mod;
  cout << ans << endl;
}
