#include <iostream>
#include <cstdio>

using namespace std;

const int P=998244353;
const int N=1000005;

int fact[N],invf[N];
int n,m,ans;

inline int quick_power(int x,int y)
{
	int ret=1;
	for (;y;y>>=1,x=1ll*x*x%P) if (y&1) ret=1ll*ret*x%P;
	return ret;
}

void pre()
{
	fact[0]=1;
	for (int i=1;i<=n+m;++i) fact[i]=1ll*fact[i-1]*i%P;
	invf[n+m]=quick_power(fact[n+m],P-2);
	for (int i=n+m;i>=1;--i) invf[i-1]=1ll*invf[i]*i%P;
}

inline int C(int n,int m){return 1ll*fact[n]*invf[m]%P*invf[n-m]%P;}

inline void update(int &x,int y){(x+=y)%=P;}

int main()
{
	//freopen("yesorno.in","r",stdin),freopen("yesorno.out","w",stdout);
	scanf("%d%d",&n,&m),pre();
	if (n<m) n^=m^=n^=m;
	for (int i=1;i<=m;++i) update(ans,1ll*C(i<<1,i)%P*C(n+m-(i<<1),n-i)%P);
	ans=(1ll*ans*quick_power(2ll*C(n+m,n)%P,P-2)%P+n)%P;
	printf("%d\n",ans);
	//fclose(stdin),fclose(stdout);
	return 0;
}