/**
 * Sergey Kopeliovich (burunduk30@gmail.com)
 */

#include <bits/stdc++.h>

using namespace std;

#define forn(i, n) for (int i = 0; i < (int)(n); i++)

const int MOD = 998244353;

typedef long long ll;

inline void add( int &a, int b ) { if ((a += b) >= MOD) a -= MOD; }
inline void sub( int &a, int b ) { if ((a -= b) < 0) a += MOD; }
inline int mul( int a, int b ) { return (ll)a * b % MOD; }

int Pow( int x, ll n ) {
	if (n == 1)	return x;
	int y = Pow(x, n / 2);
	return (n & 1) ? mul(mul(y, y), x) : mul(y, y);
}

int Inv( int a ) { return Pow(a, MOD - 2); }
int Div( int a, int b ) { return mul(a, Inv(b)); }

// int C( int n, int k ) {
// 	int res = 1;
// 	forn(i, k) {
// 		res = mul(res, n - i);
// 		res = mul(res, Inv(i + 1));
// 	}
// 	return res;
// }

const int N = 103;
int f[N][N];

int calc( int a, int b ) {
	if (a < 0 || b < 0) return 0;
	if (a > b) swap(a, b);
	if (!a && !b)
		return 0;
	int &res = f[a][b];
	if (!res) {
		res = mul(Div(a,  a + b), calc(a - 1, b));
		add(res, mul(Div(b, a + b), 1 + calc(a, b - 1)));
	}
	return res;
}

double f2[N][N];
double calc2( int a, int b ) {
	if (a < 0 || b < 0) return 0;
	if (a > b) swap(a, b);
	if (!a && !b)
		return 0;
	double &res = f2[a][b];
	if (res == 0) {
		res = 1. * a / (a + b) * calc2(a - 1, b) +
		  1. * b / (a + b) * (1 + calc2(a, b - 1));
	}
	return res;
}

double calc3( int last, int i, int balance, int n ) {
	double add = 0;
	if (balance == 0 && i < 2 * n)
		add += 0.5;
	// if (balance == 0)
	// 	add += (i - last) / 2, last = i;
	if (i == 2 * n)
		return add;
	if (i + balance < 2 * n) {
		double rest = 2 * n - i, good = (rest + balance) / 2.0;
		add += good / rest * calc3(last, i + 1, balance - 1, n);
		add += (rest - good) / rest * calc3(last, i + 1, balance + 1, n);
	} else {
		add += calc3(last, i + 1, balance - 1, n);
	}
	return add;
}

int main() {
	int n, m;
	cin >> n >> m;
	// assert(n == m);
	if (n < m)
		swap(n, m);
	int res = n, tmp = 0;

	vector<int> fact(2 * n + 1);
	fact[0] = 1;
	forn(i, 2 * n)
		fact[i + 1] = mul(fact[i], i + 1);
	auto C = [&]( int n, int k ) {
		return Div(fact[n], mul(fact[n - k], fact[k]));
	};
	int all = C(n + m, n);

	for (int i = 0; i < m; i++) {
		add(tmp, mul(C(n + m - 2 * (m - i), i), C(2 * (m - i), m - i)));
	}
	add(res, Div(tmp, all * 2 % MOD));
	printf("%d\n", res);
	// printf("%d\n", calc(n, n));
	// printf("%.7f\n", calc2(n, n));
	// printf("%.7f\n", calc3(0, 0, 0, n) + n);
}
 
#include<bits/stdc++.h>
#define fi first
#define se second
#define R register
#define mp make_pair
#define pb push_back
#define LL long long
#define Ldb long double
#define pii pair<int, int>
using namespace std;
const int N = 1e6 + 10;
const int mod = 998244353;

template <typename T> void read(T &x) {
	int f = 0;
	R char c = getchar();
	while (c < '0' || c > '9') f |= (c == '-'), c = getchar();
	for (x = 0; c >= '0' && c <= '9'; c = getchar())
		x = x * 10 - '0' + c;
	if (f) x = -x;
}

int Qpow(int x, int p) {
	int ans = 1;
	while (p) {
		if (p & 1) ans = 1LL * ans * x % mod;
		x = 1LL * x * x % mod;
		p >>= 1;
	}
	return ans;
}

int Inv(int x) {
	return Qpow(x, mod - 2);
}

// ------------------------------------------

int n, m;
int inv[N], fac[N], fav[N];

int C(int x, int y) {
	return 1LL * fac[x] * fav[y] % mod * fav[x - y] % mod;
}

int main() {
	read(n); read(m);
	if (n > m) swap(n, m);
	fac[0] = fav[0] = 1;
	inv[1] = fac[1] = fav[1] = 1;
	for (int i = 2; i <= n + m; ++i) {
		inv[i] = 1LL * -mod / i * inv[mod % i] % mod +mod;
		fac[i] = 1LL * fac[i - 1] * i % mod;
		fav[i] = 1LL * fav[i - 1] * inv[i] % mod;
	}
	int ans = 0;
	for (int i = 1; i <= n; ++i) {
		int tmp = 1LL * C(i * 2 - 1, i) * C(n + m - i * 2, n - i) % mod;
		ans = (ans + tmp >= mod) ? (ans + tmp - mod) : (ans + tmp);
	}
	ans = (n - 1LL * ans * Inv(C(n + m ,n))) % mod;
	ans = n + m - ans;
	if (ans < 0) ans += mod;
	cout << ans << endl;
	return 0;
}
