#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
int T, n, ans, m;
long long inv[4000010];
int main() {
  inv[1] = 1;
  scanf("%d%d", &n, &m);
  for (int i = 2; i <= n + m + 1; i++)
    inv[i] = (mod - mod / i) * inv[mod % i] % mod;
  long long ans = n + m + 1;
  ans = ans * (inv[m + 1]) % mod;
  long long ans2 = 0;
  for (int i = 1; i <= n; i++) ans2 += inv[i], ans2 %= mod;
  ans2 = ans2 * m % mod;
  ans2++;
  cout << (ans2 * ans) % mod;
}
