#include<cstdio>
#include<algorithm>
using namespace std;
typedef long long LL;
const int N=1000006,p=998244353;
int c[N],fc[N],i,j,k,n,m,X,an;

inline char getc()
{
	#define VV 10000000
	static char s[VV],*l=s,*r=s;
	if (l==r)
		l=s,r=s+fread(s,1,VV,stdin);
	return l==r?0:*l++;
}

int read(){ char c; int z=0; do c=getc(); while (c<'0'||c>'9'); while (c>='0'&&c<='9') z*=10,z+=c-'0',c=getc(); return z; }

int power(int z,int k)
{
	int d=1;
	for (;k;z=(LL)z*z%p,k>>=1) if (k&1) d=(LL)d*z%p;
	return d;
}

int C(int n,int m)
{
	return (LL)c[n]*fc[m]%p*fc[n-m]%p;
}

int main()
{
	//freopen("1.in","r",stdin);
	n=read(),m=read(),X=n+m;
	if (n<m) swap(n,m);
	for (c[0]=i=1;i<=X;++i) c[i]=(LL)c[i-1]*i%p;
	for (fc[X]=power(c[X],p-2),i=X;i;--i) fc[i-1]=(LL)fc[i]*i%p;
	for (i=0;i<m;++i)
		an=(an+(LL)C(n-m+i+i,i)*C(m-i<<1,m-i))%p;
	printf("%d\n",n+(LL)an*power(2,p-2)%p*power(C(n+m,m),p-2)%p);
	return 0;
}