#include<cstdio>
#include<cstring>
#include<algorithm>
#define fo(i,a,b) for(ll i=a;i<=b;i++)
#define N 1001000
#define mo 998244353
#define ll long long
using namespace std;
ll n,m,ans=0,jc[N],ny[N];
ll mi(ll a,ll b)
{
	ll c=1;
	for(;b;b/=2,a=(a*a)%mo) if(b%2==1) c=(c*a)%mo;
	return c;
}
ll C(ll m,ll n){return jc[m]*ny[n]%mo*ny[m-n]%mo;}
int main()
{
	scanf("%lld%lld",&n,&m);
	if(n>m) swap(n,m);
	jc[0]=ny[0]=1;
	fo(i,1,n+m) jc[i]=jc[i-1]*i%mo,ny[i]=mi(jc[i],mo-2);
	fo(i,1,n) 
	ans=(ans+C(i+i,i)*C(n-i+m-i,n-i))%mo;
	ans=ans*mi(2*C(n+m,n)%mo,mo-2)%mo;
	ans=(ans+m)%mo;
	printf("%lld\n",ans);
}