#include<cstdio>
#include<algorithm>
using namespace std;
const int N=1e6+5;
const int mo=998244353;
int n,m,ans,p[N+5],q[N+5];
long long ksm(long long x,int y)
{
	long long t=1;
	for (;y;y>>=1)
	{
		if (y&1) t=t*x%mo;
		x=x*x%mo;
	}
	return t;
}
long long c(int x,int y){return (long long)p[x]*q[y]%mo*q[x-y]%mo;}
int main()
{
	scanf("%d%d",&n,&m);
	p[0]=q[0]=1;
	for (int i=1;i<=n+m;i++) p[i]=(long long)p[i-1]*i%mo;
	q[n+m]=ksm(p[n+m],mo-2);
	for (int i=n+m-1;i;i--) q[i]=(long long)q[i+1]*(i+1)%mo;
	if (n<m) swap(n,m);
	for (int i=1;i<=m;i++) ans=(ans+c(i+i,i)*c(n+m-i-i,n-i))%mo;
	ans=(ans*ksm(2*c(n+m,n)%mo,mo-2)+n)%mo;
	printf("%d",ans);
	return 0;
}

