
#include <bits/stdc++.h>
#define int long long
#define ld long double
#define vc vector
#define s second
#define f first


//#include "prettyprint.hpp"

using namespace std;


typedef pair <int, int> pii;
int n, m;
int t(int a){
    return a+n;
}
int mod=998244353;
vc< vc <int> > anz, suf, pref;

bool g (int a, int b){
    if (a<0 || b<0) return false;
    if (a >n || b >=m) return false;
    return true;
}

int h (int a, int b){
    if (a<0 || a>n) return 1;
    return 0;
}

int an(int a ,int b){
    return g(a, b)? anz[a][b] : h(a, b);
}

int su(int a ,int b){
    return g(a, b)? suf[a][b] : h(a, b);
}

int pre(int a ,int b){
    return g(a, b)? pref[a][b] : h(a, b);
}
int plu (int & a, int b){
    return a =(a+b)%mod;
}

int mult (int a, int b){
    return a*b % mod;
}

int calc_inst(int i, int j){
    int s1 = mult(mult(an(i, j), an(n-i+1, j-1)), su(n-i, m-j));

    int s2 = mult(mult(an(i, j), an(i+1, m-j-1)), pre(i, m-j+1));

    return plu(s1, s2);

}
int do_calc(){
    anz = suf = pref = vc <vc <int> > (n+1, vc <int > (m+1));

    vc <vc <int > > b (n+1, vc <int> (m)), c (n+1, vc <int> (m));

    anz[0][0] = 1;


    for (int i=1; i<=n; i++){
       anz[i][0] = anz[i-1][0];
        for (int j=1; j<m; j++){
            anz[i][j] = (anz[i][j-1]+anz[i-1][j])%mod;
        }
    }
    for (int i=1; i<=n; i++){
        for (int j=1; j<m; j++){
            b[i][j] = anz[i][j]*anz[n-i+1][j-1] % mod;
            suf[i][j] = (suf[i-1][j]+b[i][j])%mod;
        }

    }


    for (int i=1; i<n; i++){
        for (int k=m-1; k>=2; k--){
            c[i][k] = anz[n-i][k]*anz[n-i+1][m-k-1]%mod;
            pref[i][k]=(pref[i][k+1]+c[i][k])%mod;
        }

    }



    int ret = 0;
    for (int i=1; i<=n; i++){
        for (int j=1; j<m; j++){
            plu(ret, calc_inst(i, j));
        }
    }
    return ret;

}

void do_test(){


    cin >> n >> m;
    int res= do_calc();
    //a1 = very_balanced();
   // cout << res << "\n";
    //swap(n, m);
  //  a2 = very_balanced();
   // res1=do_calc();
    //assert(a1 == a2);
//a1 = (n-1)*(m-1);

    res = 2*res%mod;

   // cout << "res1 " << res1 << " " << res2 << " a " << a1 <<  " " << a2 << " " << endl;

    cout << res << "\n";

    //cout << a << endl;

}
signed main(){
    ios_base::sync_with_stdio(false);


    do_test();
}
