#include<bits/stdc++.h>
#define L long long
#define vi vector<int>
#define pb push_back
#define pi pair<int,int>
#define pii pair<pi,int>
#define aa first
#define bb second
#define xx aa.aa
#define yy aa.bb
#define zz bb
#define mp make_pair
#define mpp(a,b,c) mp(mp(a,b),c)
using namespace std;
const int q=998244353;
int n,m,a[1000010],b[1000010],p;
inline int C(int n,int m)
{
	return (L)a[n]*b[m]%q*b[n-m]%q;
}
inline int C2(int n,int m)
{
	return (L)b[n]*a[m]%q*a[n-m]%q;
}
int main()
{
	//freopen(".in","r",stdin);
	//freopen(".out","w",stdout);
	int i;
	scanf("%d%d",&n,&m);
	if(n<m)
	  swap(n,m);
	a[0]=1;
	for(i=1;i<=n+m;i++)
	  a[i]=(L)a[i-1]*i%q;
	b[0]=b[1]=1;
	for(i=2;i<=n+m;i++)
	  b[i]=q-(L)q/i*b[q%i]%q;
	for(i=2;i<=n+m;i++)
	  b[i]=(L)b[i]*b[i-1]%q;
	p=n;
	for(i=1;i<=m;i++)
	  p=(p+(L)b[2]*C(2*i,i)%q*C(n-i+m-i,n-i)%q*C2(n+m,n))%q;
	printf("%d\n",p);
	return 0;
}
