#include <cstdio>
#include <algorithm>

using namespace std;

const int Mod = 998244353;
const int maxn = 1e6 + 10;

void Chkadd(int &x, int y)
{
	if ((x += y) >= Mod) x -= Mod;
}

int Power(int a, int k)
{
	int x = 1;
	for (; k; k >>= 1)
	{
		if (k & 1) x = 1ll * x * a % Mod;
		a = 1ll * a * a % Mod;
	}
	return x;
}

int fac[maxn], inv[maxn];

int Count(int n, int m)
{
	if (n < 0 || m < 0) return 0;
	return 1ll * fac[n + m] * inv[n] % Mod * inv[m] % Mod;
}

int main()
{
	int n, m;
	scanf("%d%d", &n, &m);
	if (n < m) swap(n, m);
	int tot (n + m);
	fac[0] = 1;
	for (int i = 1; i <= tot; ++ i)
		fac[i] = 1ll * fac[i - 1] * i % Mod;
	inv[tot] = Power(fac[tot], Mod - 2);
	for (int i = tot; i; -- i)
		inv[i - 1] = 1ll * inv[i] * i % Mod;
	int ans = 0;
	for (int i = 1; i <= m; ++ i)
		Chkadd(ans, 1ll * Count(i, i) * Count(n - i, m - i) % Mod);
	ans = 1ll * ans * Power(2 * Count(n, m), Mod - 2) % Mod;
	printf("%d\n", (ans + n) % Mod);
	return 0;
}
