#include <bits/stdc++.h>
using namespace std;
inline char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
inline long long read() {
  long long x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') positive = 0;
  for (; isdigit(ch); ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
inline void write(long long a) {
  if (a < 0) {
    a = -a;
    putchar('-');
  }
  if (a >= 10) write(a / 10);
  putchar('0' + a % 10);
}
inline void writeln(long long a) {
  write(a);
  puts("");
}
inline void wri(long long a) {
  write(a);
  putchar(' ');
}
long long rnd() {
  unsigned long long ans = 0;
  for (int i = (int)(0); i <= (int)(4); i++) ans = ans << 15 ^ rand();
  return ans % ((unsigned long long)1 << 63);
}
const int mod = 998244353, N = 2000005;
long long ksm(long long a, int b) {
  int ans = 1;
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod;
  }
  return ans;
}
long long n, m, fac[N << 1], ni[N << 1];
long long c(int a, int b) { return fac[a] * ni[b] % mod * ni[a - b] % mod; }
int main() {
  n = read();
  m = read();
  for (int i = (int)(fac[0] = 1); i <= (int)(n + m); i++)
    fac[i] = fac[i - 1] * i % mod;
  ni[n + m] = ksm(fac[n + m], mod - 2);
  for (int i = (int)(n + m); i >= (int)(1); i--) ni[i - 1] = ni[i] * i % mod;
  long long ans = 0;
  for (int i = (int)(1); i <= (int)(n); i++) {
    ans = (ans + c(n, i) * (i % 2 ? 1 : mod - 1) % mod * (i + m) % mod *
                     (fac[i - 1] * ni[i] % mod)) %
          mod;
  }
  cout << (n * ksm(m + 1, mod - 2) + 1) % mod * ans % mod * 1 % mod << endl;
}
