//Be Name Khoda, Besmellah Rahmane Rahim, In The Name Of God;
//#include<bits/stdc++.h>
#include<iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include<bitset>
#include<list>
#include<cassert>
#include<numeric>
#include <stdio.h>
#include <string.h>
#include<iomanip>
#include<unordered_map>
#include<unordered_set>
#include <fstream>

using namespace std;
 
using namespace std;

const int N = 1e6 + 5;
const int mod = 998244353;


long long fact[N];
int n, m;

void pre()
{
    fact[0] = 1;
    for (int i = 1; i < N; i++)
    {
        fact[i] = fact[i - 1] * i;
        fact[i] = fact[i] % mod;
    }
}

int power(int a, int b)
{
    if (!b)
    {
        return 1;
    }
    long long ans = power(a, b / 2);
    ans = ans * ans;
    ans = ans % mod;
    if (b % 2)
    {
        ans = ans * a;
        ans = ans % mod;
    }
    return ans;
}


long long choose(int a, int b)
{
    if (b > a)
    {
        return 0;
    }
    long long ans = fact[a];
    ans = ans * power(fact[b], mod - 2);
    ans = ans % mod;
    ans = ans * power(fact[a - b], mod - 2);
    ans = ans % mod;
    return ans;
}




int main() 
{
    pre();
    //cout << choose(5, 2) << endl;
    cin >> n >> m;
    long long ans = 0;
    for (int i = 1; i <= n && i <= m; i++) 
    {
        long long tmp = choose(i * 2, i) * choose(n + m - 2 * i, n - i);
        tmp = tmp % mod;
        ans += tmp;
        ans = ans % mod;
    }
    long long tmp = choose(n + m, n) * 2;
    tmp = power(tmp, mod - 2);
    ans = ans * tmp;
    ans = ans % mod;
    ans += max(n, m);
    ans = ans % mod;
    cout << ans << endl;
}






#include <bits/stdc++.h>
#define fi first
#define se second
#define pii pair<int,int>
#define mp make_pair
#define pb push_back
#define space putchar(' ')
#define enter putchar('\n')
#define MAXN 1000005
#define eps 1e-12
//#define ivorysi
using namespace std;
typedef long long int64;
typedef unsigned int u32;
typedef double db;
template<class T>
void read(T &res) {
    res = 0;T f = 1;char c = getchar();
    while(c < '0' || c > '9') {
        if(c == '-') f = -1;
        c = getchar();
    }
    while(c >= '0' && c <= '9') {
        res = res * 10 + c - '0';
        c = getchar();
    }
    res *= f;
}
template<class T>
void out(T x) {
    if(x < 0) {x = -x;putchar('-');}
    if(x >= 10) {
        out(x / 10);
    }
    putchar('0' + x % 10);
}
const int MOD = 998244353;
int N,M;
int fac[MAXN],invfac[MAXN],f[MAXN],v[MAXN],h[MAXN],inv[MAXN];
int inc(int a,int b) {
    return a + b >= MOD ? a + b - MOD : a + b;
}
int mul(int a,int b) {
    return 1LL * a * b % MOD;
}
int C(int n,int m) {
    if(n < m) return 0;
    return mul(fac[n],mul(invfac[m],invfac[n - m]));
}
int way(int x1,int y1,int x2,int y2) {
    return C(x2 - x1 + y2 - y1,y2 - y1);
}
void update(int &x,int y) {
    x = inc(x,y);
}
int fpow(int x,int c) {
    int res = 1,t = x;
    while(c) {
        if(c & 1) res = mul(res,t);
        t = mul(t,t);
        c >>= 1;
    }
    return res;
}
void Solve() {
    read(N);read(M);
    fac[0] = 1;
    inv[1] = 1;
    for(int i = 1 ; i <= N + M ; ++i) {
        fac[i] = mul(fac[i - 1],i);
        if(i > 1) inv[i] = mul(inv[MOD % i],MOD - MOD / i);
    }
    invfac[N + M] = fpow(fac[N + M],MOD - 2);
    for(int i = N + M - 1 ; i >= 0 ; --i) {
        invfac[i] = mul(invfac[i + 1],i + 1);
    }
    if(M > N) h[0] = 1;
    if(N > M) v[0] = 1;
    for(int i = 1 ; i <= N + M ; ++i) {
        h[i] = h[i - 1];
        int r = min(i - 1,N) - h[i - 1] + 1,c = i - 1 - r + 1;
        if(i <= N && M - (N - r) >= c + 1) ++h[i];
        if(i > N && M - (N - r) <= c) --h[i];
        v[i] = v[i - 1];
        c = min(i - 1,M) - v[i - 1] + 1,r = i - 1 - c + 1;
        if(i <= M && N - (M - c) >= r + 1) ++v[i];
        if(i > M && N - (M - c) <= r) --v[i];
    }
    f[0] = mul(C(N + M, N),max(N,M));
    int valh = 0,valv = 0;
    if(h[0]) valh = C(N + M - 1, M - 1);
    if(v[0]) valv = C(N + M - 1, N - 1);
    for(int i = 1 ; i < N + M ; ++i) {
        f[i] = f[i - 1];
        if(h[i - 1]) f[i] = inc(f[i],MOD - valh);
        if(v[i - 1]) f[i] = inc(f[i],MOD - valv);
        if(!h[i - 1] && h[i]) valh = way(i,0,N,M - 1);
        if(!v[i - 1] && v[i]) valv = way(0,i,N - 1,M);
        int r1 = min(i - 1,N) - h[i - 1] + 1,c1 = i - 1 - r1;
        int r2 = min(i,N) - h[i] + 1,c2 = i - r2;
        if(h[i - 1]) {
            if(r2 > r1) {
                valh = inc(valh, MOD - mul(way(0,0,r1,c1),way(r1,c1 + 1,N,M - 1)));
            }
            else {
                if(r2 >= 1) valh = inc(valh,mul(way(0,0,r2 - 1,c2),way(r2,c2,N,M - 1)));
            }
        }
        c1 = min(i - 1,M) - v[i - 1] + 1,r1 = i - 1 - c1;
        c2 = min(i,M) - v[i] + 1,r2 = i - c2;
        if(v[i - 1]) {
            if(c2 > c1) {
                valv = inc(valv, MOD - mul(way(0,0,r1,c1),way(r1 + 1,c1,N - 1,M)));
            }
            else {
                if(c2 >= 1) valv = inc(valv,mul(way(0,0,r2,c2 - 1),way(r2,c2,N - 1,M)));
            }
        }
    }
    int ans = 0;
    for(int i = 0 ; i < N + M ; ++i) {
        ans = inc(ans,mul(f[i],inv[N + M - i]));
    }
    ans = mul(ans,fpow(C(N + M,N),MOD - 2));
    out(ans);enter;
}
int main() {
#ifdef ivorysi
	freopen("f1.in","r",stdin);
#endif
    Solve();
}
