#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<ctime>
#include<queue>
#include<set>
#include<map>
#include<stack>
#include<bitset>
using namespace std;
typedef long long LL;
const int N=1e6+1;
int gi() {
	int w=0;bool q=1;char c=getchar();
	while ((c<'0'||c>'9') && c!='-') c=getchar();
	if (c=='-') q=0,c=getchar();
	while (c>='0'&&c <= '9') w=w*10+c-'0',c=getchar();
	return q? w:-w;
}
const int mod=998244353;
int fac[N],inv[N];
inline int C(int n,int m) { return 1LL*fac[n]*inv[m]%mod*inv[n-m]%mod; }
int main()
{
	int n=gi(),m=gi(),i,ans=0;
	for (i=fac[0]=1;i<=n+m;i++) fac[i]=1LL*fac[i-1]*i%mod;
	for (i=2,inv[0]=inv[1]=1;i<=n+m;i++) inv[i]=-1LL*(mod/i)*inv[mod%i]%mod;
	for (i=3;i<=n+m;i++) inv[i]=1LL*inv[i]*inv[i-1]%mod;

	for (i=min(n,m);i;i--)
		ans=(ans+1LL*C(2*i,i)*C(n+m-i*2,n-i))%mod;
	ans=1LL*ans*fac[n]%mod*fac[m]%mod*inv[n+m]%mod;
	cout<<(max(n,m)+1LL*ans*((mod+1)/2)%mod+mod)%mod;
	return 0;
}
