#include <bits/stdc++.h>
using namespace std;
constexpr long long MODULO = 998244353;
long long pw(long long a, long long k) {
  long long r = 1;
  while (k) {
    if (k & 1) {
      r = r * a % MODULO;
    }
    a = a * a % MODULO;
    k >>= 1;
  }
  return r;
}
long long inv(long long a) { return pw(a, MODULO - 2); }
class TaskH {
 public:
  void solveOne(istream &in, ostream &out) {
    int n, m;
    in >> n >> m;
    vector<long long> e(n + 1);
    vector<long long> f(n + 1);
    for (int i = n; i > 0; --i) {
      long long denom = inv(i + m);
      long long down = i * denom % MODULO;
      long long same = m * denom % MODULO;
      long long places = inv(i + m + 1);
      f[i - 1] = (f[i - 1] + f[i] * down) % MODULO;
      e[i - 1] = (e[i - 1] + down * (e[i] + 1 + f[i])) % MODULO;
      long long reps = inv(down);
      f[i - 1] = (f[i - 1] + same * ((n - i) * places % MODULO)) % MODULO;
      e[i - 1] = (e[i - 1] +
                  same * (e[i] + 1 + f[i] +
                          reps * (1 + (n - i) * places % MODULO) % MODULO)) %
                 MODULO;
    }
    long long res = (e[0] + 1 + f[0]) % MODULO;
    out << res << "\n";
  }
  void solve(std::istream &in, std::ostream &out) {
    int nt = 1;
    for (int it = 0; it < nt; ++it) {
      solveOne(in, out);
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  TaskH solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
