#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 10;
const int mod = 998244353;
int inv[N], n, m;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  inv[1] = 1;
  for (int i = 2; i < N; i++)
    inv[i] = 1ll * (mod - mod / i) * inv[mod % i] % mod;
  cin >> n >> m;
  int sum = 0;
  for (int i = 1; i <= n; i++) sum = (sum + inv[i]) % mod;
  cout << (1ll * n * inv[m + 1] + 1) % mod * (1ll * m * sum % mod + 1) % mod
       << '\n';
  return 0;
}
