#include<cstdio>
#include<algorithm>
#include<queue>
#include<cmath>
#include<iostream>
#include<cstring>
#define ll long long
#define maxn 
#define re(i,a,b) for(int i=a;i<=b;i++)
using namespace std;
inline int read(){char c=getchar();int f=1;int ans = 0;while(c>'9'||c<'0'){if(c=='-')f=-f;c=getchar();}while(c<='9'&&c>='0'){ans =ans*10+c-'0';c=getchar();}return ans*f;}
//_____________________________________________________________________________________________________
int n,m;
int rader[1<<21],limit;
const ll p = 998244353 , G = 3 , Gi =  332748118;
inline ll ksm(ll x,ll b)
{
    ll ans = 1;
    while(b)
    {
        if(b&1)
            (ans*=x)%=p;
        (x*=x)%=p;
        b>>=1;
    }
    return ans;
}
#define SI sizeof(ll)
inline void NTT(ll*F,int type)
{
    re(i,0,limit-1)
    {
        rader[i] = rader[i>>1]>>1;
        if(i&1) rader[i] |= limit>>1;
        if(i<rader[i]) swap(F[i],F[rader[i]]);
        //printf("%d %d\n",i,rader[i]);
    }
    for(int mid = 1;mid<limit;mid<<=1)
    {
        ll e = ksm( type==1 ? G : Gi , (p-1)/(mid*2) );
        for(int i = 0; i<limit ;i+= mid<<1)
        {
            ll w = 1;
            for(int j=0;j<mid;j++,(w*=e)%=p)
            {
                ll x = F[ i+j ] , y = F[ i+j+mid ] * w %p;
                F[i+j] = ( x+y )% p , F[ i+j+mid ] = ( x-y )%p ;
            }
        }
    }
    if(type==-1)
    {
        ll inv = ksm(limit , p-2);
        re(i,0,limit-1)
            (F[i]*=inv)%=p;
    }

}
ll M_A[1<<20],M_B[1<<20];
inline void MUL(ll*A,ll*B,ll*O)
{
    memcpy(M_A,A,SI*limit);
    memset(M_A+limit,0,SI*limit);
    memcpy(M_B,B,SI*limit);
    memset(M_B+limit,0,SI*limit);
    limit<<=1;
    NTT(M_A,1);
    NTT(M_B,1);
    re(i,0,limit-1)
        O[i] = M_A[i] * M_B[i] %p;
    NTT(O,-1);
    limit>>=1;
    memset(O+limit,0,SI*limit);
}
ll I[1<<21],I_O[1<<21],I_A[1<<21];
inline void INV(ll*A,ll*O)
{
    int N = limit;
    I_O[0] = ksm( A[0],p-2 );
    //re(i,0,limit-1) printf("%lld ",(A[i]+p)%p );printf("\n");
    for(int lim=1;lim<N;lim<<=1)
    {
        memcpy(I_A,A,SI*lim*2);
        memset(I_A+lim*2,0,SI*lim*2);
        memcpy(I,I_O,SI*lim);
        memset(I+lim,0,SI*lim*3);
        limit = lim*4;
    	//re(i,0,limit-1) printf("%lld ",(I_A[i]+p)%p );printf("\n");
    	//re(i,0,limit-1) printf("%lld ",(I[i]+p)%p );printf("\n");
        NTT(I_A,1);
        NTT(I,1);
        re(i,0,limit-1)
            I_O[i] = I[i] * ( 2ll - I_A[i]*I[i] %p )%p;
        NTT(I_O,-1);
        
    	//re(i,0,limit-1) printf("%lld ",(I_O[i]+p)%p );printf("\n_________\n");
    }
    memcpy(O,I_O,SI*limit);
    limit = N;
}
ll fac[1<<21],DP[1<<20],C1[1<<20],C2[1<<20],C3[1<<20],C4[1<<20],C5[1<<20],CNT[1<<20],inv[1<<20];
inline ll C(int n,int m)
{
    if(n<m) return 0;
    return fac[n] * ksm( fac[n-m]*fac[m]%p ,p-2) %p;
}

int main()
{
	//freopen("0.txt","r",stdin);
    int n=read(),m=read();
    fac[0] = 1; re(i,1, n+m ) fac[i] = fac[i-1] * i %p;
    int t=min(n,m),ans=0;
    for(int i=1;i<=t;i++)
        ans=(ans+1ll*C(2*i,i)*C(n+m-2*i,n-i))%p;
    ans=1ll*ans*ksm(C(n+m,n),p-2)%p*ksm(fac[2],p-2)%p;
    printf("%d\n",(ans+max(n,m))%p);
    return 0;
}


/*
int main()
{
	freopen("0.txt","r",stdin);
    n = read() , m = read();
    if(n<m) swap(n,m);
    limit = 1; while(limit<=n) limit<<=1;
    
    fac[0] = 1; re(i,1, limit*3 ) fac[i] = fac[i-1] * i %p;
    re(i,0,limit-1) inv[i] = ksm( i,p-2 );
    re(i,0,limit-1)
    	C1[i] = -2ll*C(2*i-2,i-1) %p * inv[i] %p;
    	C1[0]++;
    INV(C1,DP);
    re(i,0,limit-1)
    	C2[i] = inv[i] * (2ll*i+1) %p * C(2*i-2,i-1) %p;
    re(i,0,limit-1)
    	C3[i] = C( 2*i,i );
    	
    MUL(DP,C2,DP);
    MUL(DP,C3,DP);
    
    if(n==m)
    {
    	printf("%lld\n",(DP[n]*ksm(C(2*n,n),p-2)%p+p)%p );
    	return 0;
    }
    re(i,0,limit-1)
    	C4[i] = C( 2*i+n-m-1,i );
    re(i,0,limit-1)
    	C5[i] = C( 2*i-1,i );
    C5[0] ++;
    INV( C5,CNT );
    MUL( CNT,C4,CNT );
	ll ans  = 0;
	re(i,0,m)
		( ans +=  ( DP[m-i] + (n-m+i)*C(2*m-2*i,m-i) )%p *CNT[i]  ) %=p;
	printf("%lld\n",( ans*ksm(C(n+m,m),p-2)%p+p )%p);
    return 0;
}*/


Measured memory_bytes: 8448