#include <iostream> 
#include <cstdio> 
#include <cstdlib> 
#include <cstring> 
#include <cmath> 
#include <algorithm> 
using namespace std; 
const int Mod = 998244353; 
int fpow(int x, int y) {
	int res = 1; 
	while (y) {
		if (y & 1) res = 1ll * res * x % Mod; 
		x = 1ll * x * x % Mod; 
		y >>= 1; 
	} 
	return res; 
} 
const int MAX_N = 1e6 + 5; 
int N = 1e6, M, fac[MAX_N], ifc[MAX_N]; 
int C(int n, int m) {
	if (n < m || n < 0 || m < 0) return 0; 
	else return 1ll * fac[n] * ifc[m] % Mod * ifc[n - m] % Mod; 
} 
int main () { 
	for (int i = fac[0] = 1; i <= N; i++) fac[i] = 1ll * fac[i - 1] * i % Mod; 
	ifc[N] = fpow(fac[N], Mod - 2); 
	for (int i = N - 1; ~i; i--) ifc[i] = 1ll * ifc[i + 1] * (i + 1) % Mod; 
	cin >> N >> M; 
	if (N > M) swap(N, M); 
	int ans = 0; 
	for (int i = 1; i <= N; i++) ans = (ans + 1ll * C(i << 1, i) * C(N - i + M - i, N - i)) % Mod; 
	ans = 1ll * ans * fpow(2 * C(N + M, M) % Mod, Mod - 2) % Mod; 
	printf("%d\n", (ans + M) % Mod); 
    return 0; 
} 
#include <bits/stdc++.h>

using namespace std;

const int md = 998244353;

inline void add(int &a, int b) {
  a += b;
  if (a >= md) {
    a -= md;
  }
}

inline int mul(int a, int b) {
  return (long long) a * b % md;
}

inline int power(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = mul(res, a);
    }
    a = mul(a, a);
    b >>= 1;
  }
  return res;
}

inline int inv(int x) {
  return power(x, md - 2);
}

const int N = 2000010;

int fact[N], inv_fact[N];

inline int C(int n, int k) {
  if (k < 0 || k > n) {
    return 0;
  }
  return mul(fact[n], mul(inv_fact[k], inv_fact[n - k]));
}

int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  fact[0] = inv_fact[0] = 1;
  for (int i = 1; i <= n + m; i++) {
    fact[i] = mul(fact[i - 1], i);
    inv_fact[i] = inv(fact[i]);
  }
  int ans = 0;
  int cur = 0;
  int val = C(n + m, n);
  for (int s = 1; s <= n + m; s++) {
    add(cur, val);
    add(ans, mul(cur, inv(s)));
    int x = C(n + m - (s + 1), n - (s + 1) / 2);
    int y = C(n + m - (s + 1), m - (s + 1) / 2);
    int z = C(s - 1, s / 2);
    int ways = mul(z, x + y);
    if (s % 2 == 0) {
      add(val, ways);
    } else {
      add(val, md - ways);
    }
  }
  ans = mul(ans, inv(C(n + m, n)));
  printf("%d\n", ans);
  cerr << "time = " << clock() << " ms" << endl;
  return 0;
}
