#include <cstdio>
#include <cstdlib>
#include <iostream>
#include <cstring>
#include <cmath>
#include <algorithm>
#define mo 998244353
#define LL long long
#define N 1000005
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fod(i,a,b) for(int i=a;i>=b;i--)
using namespace std;
LL js[N],ny[N];
LL ksm(LL k,LL n)
{
	LL s=1;
	for(;n;k=k*k%mo,n>>=1) if(n&1) s=s*k%mo;
	return s;
}
LL C(LL n,LL m)
{
	return js[n]*ny[m]%mo*ny[n-m]%mo;
}
int main()
{
	int n,m;
	cin>>n>>m;
	if(n<m) swap(n,m);
	js[0]=1;
	fo(i,1,n*2) js[i]=js[i-1]*(LL)i%mo;
	ny[2*n]=ksm(js[2*n],mo-2);
	fod(i,2*n-1,0) ny[i]=ny[i+1]*(LL)(i+1)%mo;
	LL ans=0;
	fo(i,1,m) 
	{
		ans=(ans+C(n+m-i-i,n-i)*C(i+i,i)%mo)%mo;
	}
	ans=ans*ny[2]%mo*ksm(C(n+m,m),mo-2)%mo;
	printf("%lld\n",(ans+n)%mo);
}