#include<cstdio>
#include<iostream>
#include<cmath>
#include<cstring>
#include<algorithm>
#include<set>
#include<map>
using namespace std;
#define rep(i,l,r) for(register int i=(l);i<=(r);++i)
#define repdo(i,l,r) for(register int i=(l);i>=(r);--i)
#define il inline
typedef double db;
typedef long long ll;

//---------------------------------------
const ll nmod=998244353,nsz=5e5+50;
int n,m;
//ll dp[2][nsz*2],cur=1;
ll fac[nsz*2],ifac[nsz*2],ninv[nsz*2];

ll qpow(ll a,ll b){
	ll res=1;
	while(b){
		if(b&1)res=res*a%nmod;
		b>>=1,a=a*a%nmod;
	}
	return res;
}
ll inv(ll a){return qpow(a,nmod-2);}
ll c(ll a,ll b){
	if(a<0||b<0||a<b)return 0;
	return fac[a]*ifac[b]%nmod*ifac[a-b]%nmod;
}

int main(){
	cin>>n>>m;
	if(n<m)swap(n,m);
	fac[0]=1;
	rep(i,1,n+m){
		fac[i]=fac[i-1]*i%nmod;
	}
	ifac[n+m]=inv(fac[n+m]);
	repdo(i,n+m-1,1){
		ifac[i]=ifac[i+1]*(i+1)%nmod;
		ninv[i]=fac[i-1]*ifac[i]%nmod;
	}
	ifac[0]=1;
	ll ans=0;	
	rep(i,1,m){
		ans=(ans+c(i*2,i)*c(n+m-i*2,n-i))%nmod;
	}
	ans=(ans*qpow(c(m+n,n)*2%nmod,nmod-2))%nmod;
	ans=(ans+n)%nmod;
	cout<<ans<<'\n';
    return 0;
}












