#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#define rep(i,l,r) for(int i=(l);i<=(r);++i)
#define per(i,r,l) for(int i=(r);i>=(l);--i)
using namespace std;
const int P=998244353,maxn=1e6+10;
int fac[maxn],ifac[maxn],n,m,ans;
int ksm(int a,int b){
    int ans=1;
    for(;b;b>>=1,a=1ll*a*a%P) if(b&1) ans=1ll*ans*a%P;
    return ans;
}
void init(int n){
    fac[0]=1;
    rep(i,1,n) fac[i]=1ll*fac[i-1]*i%P;
    ifac[n]=ksm(fac[n],P-2);
    per(i,n-1,0) ifac[i]=1ll*ifac[i+1]*(i+1)%P;
}
int C(int n,int k){
    if(n<k||k<0) return 0;
    return 1ll*fac[n]*ifac[k]%P*ifac[n-k]%P;
}
int iC(int n,int k){
    if(n<k||k<0) return 0;
    return 1ll*ifac[n]*fac[k]%P*fac[n-k]%P;
}
int main(){
    scanf("%d%d",&n,&m);init(n+m);
    if(n<m) swap(n,m);
    rep(i,1,m) ans=(ans+1ll*C(i*2,i)*C(n+m-i*2,n-i)%P)%P;
    ans=1ll*ans*ifac[2]%P*iC(n+m,n)%P;
    printf("%d\n",(ans+n)%P);
    return 0;
}