#pragma GCC optimize "-O3"
#include <bits/stdc++.h>

typedef long long ll;
typedef long long llong;
typedef long double ld;
typedef unsigned long long ull;

using namespace std;

const ll MOD = 998244353;

ll pw(ll a, ll b) {
	ll ans = 1;
	while (b) {
		while (!(b & 1))
			b >>= 1, a = (a * a) % MOD;
		--b;
		ans = (ans * a) % MOD;
	}
	return ans;
}

const int MX = 510000;

ll fc[MX * 2];
ll bfc[MX * 2];

ll cnk(int n, int k) {
	return fc[n] * bfc[k] % MOD * bfc[n - k] % MOD;
}

int main() {
	fc[0] = 1;
	bfc[0] = 1;
	for (int i = 1; i < 2 * MX; ++i) {
		fc[i] = (fc[i - 1] * i) % MOD;
		bfc[i] = pw(fc[i], MOD - 2) % MOD;
	}
	for (int i = 1; i < 2 * MX; ++i)
		fc[i] = (fc[i - 1] * i) % MOD;
	int n, m;
	cin >> n >> m;
	if (n < m)
		swap(n, m);
	ll go = 0;
	for (int i = 1; i <= m; ++i) {
		go = (go + cnk(i * 2, i) * cnk(n - i + m - i, n - i)) % MOD;
	}
	go = (go * pw(2, MOD - 2)) % MOD;
	go = go * pw(cnk(n + m, m), MOD - 2) % MOD;
	go = (go + n) % MOD;
	cout << go << "\n";
	return 0;
}


