#include<bits/stdc++.h>
#define REP(i,m) for(int i=0;i<(m);++i)
#define REPN(i,m,in) for(int i=(in);i<(m);++i)
#define ALL(t) (t).begin(),(t).end()
#define CLR(a) memset((a),0,sizeof(a))
#define pb push_back
#define mp make_pair
#define fr first
#define sc second

using namespace std;


#ifndef ONLINE_JUDGE
#define dump(x)  cerr << #x << " = " << (x) << endl
#define prl cerr<<"called:"<< __LINE__<<endl
#define dumpR(x) cerr<<"\x1b[31m"<<#x<<" = " <<(x)<<"\x1b[39m"<<endl
#define dumpY(x) cerr<<"\x1b[33m"<<#x<<" = " <<(x)<<"\x1b[39m"<<endl
#define dumpG(x) cerr<<"\x1b[32m"<<#x<<" = " <<(x)<<"\x1b[39m"<<endl
template<class T> void debug(T a,T b){ for(;a!=b;++a) cerr<<*a<<' ';cerr<<endl;}
#else
#define dump(x) ;
#define dumpR(x) ;
#define dumpY(x) ;
#define dumpG(x) ;
#define prl ;
template<class T> void debug(T a,T b){ ;}
#endif

template<class T> void chmin(T& a,const T& b) { if(a>b) a=b; }
template<class T> void chmax(T& a,const T& b) { if(a<b) a=b; }

typedef long long int lint;
typedef pair<int,int> pi;

namespace std{
  template<class S,class T>
  ostream &operator <<(ostream& out,const pair<S,T>& a){
    out<<'('<<a.fr<<','<<a.sc<<')';
    return out;
  }
}

template<lint mod>
struct Int_{
  unsigned x;
  unsigned mpow(Int_ a,unsigned k){
    Int_ res=1;
    while(k){
      if(k&1) res=res*a;
      a=a*a;
      k>>=1;
    }
    return res.x;
  }
  unsigned inverse(Int_ a){
    return mpow(a,mod-2);
  }
  Int_(): x(0) { }
  Int_(long long sig) {
    int sigt=sig%mod;
    if(sigt<0) sigt+=mod;
    x=sigt;
  }
  unsigned get() const { return (unsigned)x; }

  Int_ &operator+=(Int_ that) { if((x += that.x) >= mod) x -= mod; return *this; }
  Int_ &operator-=(Int_ that) { if((x += mod - that.x) >= mod) x -= mod; return *this; }
  Int_ &operator*=(Int_ that) { x = (unsigned long long)x * that.x % mod; return *this; }
  Int_ &operator=(Int_ that) { x=that.x; return *this;}
  Int_ &operator/=(Int_ that) { x=(unsigned long long) x * inverse(that.x)%mod; return *this;}
  bool operator==(Int_ that) const { return x==that.x; }
  bool operator!=(Int_ that) const { return x!=that.x; }

  Int_ operator-() const { return Int_(0)-Int_(*this);}
  Int_ operator+(Int_ that) const { return Int_(*this) += that; }
  Int_ operator-(Int_ that) const { return Int_(*this) -= that; }
  Int_ operator*(Int_ that) const { return Int_(*this) *= that; }
  Int_ operator/(Int_ that) const { return Int_(*this) /= that; }
  Int_ inv(){
    return Int_(mpow(x,mod-2));
  }
};

namespace std{
  template<lint mod>
  ostream &operator <<(ostream& out,const Int_<mod>& a){
    out<<a.get();
    return out;
  }
  template<lint mod>
  istream &operator >>(istream& in,Int_<mod>& a){
    in>>a.x;
    return in;
  }
};

typedef Int_<998244353> Int;

Int mpow(Int a,lint k){
  Int res=1;
  while(k){
    if(k&1) res=res*a;
    a=a*a;
    k>>=1;
  }
  return res;
}

Int fact[1000005],invf[1000005];
Int inv[1000005];
Int C(int a,int b){
  if(a<0 || b<0 || a<b) return 0;
  return fact[a]*invf[b]*invf[a-b];
}
int main(){
#ifdef LOCAL_REDIR
  freopen("/home/hog/Dropbox/pg/working/in.txt","r",stdin);
#endif
  int h,w;cin>>h>>w;
  if(h>w) swap(h,w);

  const int M=1000002;
  fact[0]=1;
  REP(i,M) fact[i+1]=fact[i]*(i+1);
  invf[M]=fact[M].inv();
  for(int i=M-1;i>=0;--i) invf[i]=invf[i+1]*(i+1);
  REP(i,M) inv[i+1]=fact[i]*invf[i+1];


  Int res=0;
  Int cur=0;
  for(int i=1;i<=h+w;++i){
    if(i==1){
      cur=C(h+w-1,w-1);
    }else{
      if(i%2==0){
        int px=i/2-1,py=i/2;
        cur=cur+C(px-1+py,py)*C(h+w-1-px-py,h-py);
      }else{
        int px=i/2-1,py=i/2+1;
        cur=cur-C(px+py-1,px)*C(h+w-1-px-py,h-py);
      }
//      if(i-1>w){
//        int px=w,py=(i-1)-w;
//        cur-=C(px+py-1,px);
//      }
    }
    res+=cur;
  }


  for(int i=1;i<h+h;++i){
    if(i==1){
      cur=C(h+w-1,h-1);
    }else{
      if(i%2==0){
        int px=i/2,py=i/2-1;
        cur=cur-C(px-1+py,py)*C(h+w-1-px-py,w-px);
      }else{
        int px=i/2,py=i/2;
        cur=cur+C(px+py-1,px)*C(h+w-1-px-py,w-px);
      }
//      if(i-1>h){
//        int px=(i-1)-h,py=h;
//        cur-=C(px+py-1,py);
//      }
    }
    res+=cur;
  }
  res/=C(h+w,h);
  cout<<res<<endl;

  return 0;
}






Measured memory_bytes: 11904