#include<cstdio>
using namespace std;
#define LL long long
#define mod 998244353
const int NN=1000000+117;
LL fact[NN]={};
LL rev[NN]={};
LL comp(int m,int n){
	return fact[n]*rev[m]%mod*rev[n-m]%mod;
}
LL ksm(LL a,LL b){
	LL ret=1;
	while(b){
		if(b&1){
			(ret*=a)%=mod;
		}
		(a*=a)%=mod;
		b>>=1;
	}
	return ret;
}
int main(){
	int n,m;
	scanf("%d%d",&n,&m);
	int top=n+m;
	fact[0]=1;
	for(int i=1;i<=top;++i)
		fact[i]=fact[i-1]*i%mod;
	rev[top]=ksm(fact[top],mod-2);
	for(int i=top;i>=1;--i)
		rev[i-1]=rev[i]*i%mod;
	if(n<m)m^=n^=m^=n;
	LL ans=0;
	for(int i=1;i<=m;++i){
		ans+=comp(i,2*i)*comp(m-i,n+m-2*i)%mod;
		ans%=mod;
	}
	ans=ans*rev[2]%mod*rev[m+n]%mod*fact[n]%mod*fact[m]%mod;
	ans+=n;
	ans%=mod;
	printf("%lld\n",ans);
}
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <vector>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <ctime>
#include <cassert>
#include <complex>
#include <string>
#include <cstring>
#include <chrono>
#include <random>
#include <bitset>
using namespace std;

#ifdef LOCAL
	#define eprintf(...) fprintf(stderr, __VA_ARGS__);fflush(stderr);
#else
	#define eprintf(...) 42
#endif

using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
template<typename T>
using pair2 = pair<T, T>;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
	return (ull)rng() % B;
}

#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second

clock_t startTime;
double getCurrentTime() {
	return (double)(clock() - startTime) / CLOCKS_PER_SEC;
}


const ll MOD = 998244353;
ll add(ll x, ll y) {
	x += y;
	if (x >= MOD) return x - MOD;
	return x;
}
ll sub(ll x, ll y) {
	x -= y;
	if (x < 0) return x + MOD;
	return x;
}
ll mult(ll x, ll y) {
	return (x * y) % MOD;
}
ll bin_pow(ll x, ll p) {
	if (p == 0) return 1;
	if (p & 1) return mult(x, bin_pow(x, p - 1));
	return bin_pow(mult(x, x), p / 2);
}
ll rev(ll x) {
	return bin_pow(x, MOD - 2);
}

const int N = (int)1e6 + 77;
ll f[N], rf[N];

ll getC(int n, int k) {
	if (k < 0 || k > n) return 0;
	return mult(f[n], mult(rf[k], rf[n - k]));
}

int main()
{
	startTime = clock();
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);

	f[0] = 1;
	for (int i = 1; i < N; i++)
		f[i] = mult(f[i - 1], i);
	rf[N - 1] = rev(f[N - 1]);
	for (int i = N - 1; i > 0; i--)
		rf[i - 1] = mult(rf[i], i);

	int n, m;
	scanf("%d%d", &n, &m);
	ll ans = 0;
	for (int k = 1; k <= min(n, m); k++)
		ans = add(ans, mult(getC(2 * k, k), getC(n + m - 2 * k, n - k)));
	ans = mult(ans, rev(mult(2, getC(n + m, m))));
	ans = add(ans, max(n, m));
	printf("%lld\n", ans);

	return 0;
}
