//#define MULTICASES
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i,a,b) for(i=(a);i<=(b);++i)
#define per(i,a,b) for(i=(a);i>=(b);--i)
#define REP(i,a,b) for(i=(a);i< (b);++i)
#define PER(i,a,b) for(i=(a);i> (b);--i)
#define ERR(...) fprintf(stderr,__VA_ARGS__)
inline void ac();
int main(){
#ifdef MULTICASES
	int t;scanf("%d",&t);while(t--)ac();
#else
	ac();
#endif
	return 0;
}
const int MAXN=2048;
const ll p=998244353ll;
ll C[MAXN][MAXN];
inline void ac(){
	int n,m,i,j;ll s=0ll,t;
	scanf("%d%d",&n,&m);
	rep(i,0,m)C[0][i]=1ll;
	rep(i,1,n){
		C[i][0]=t=1ll;
		rep(j,1,m){
			if((t+=C[i-1][j])>=p)t-=p;
			C[i][j]=t;
		}
	}
	REP(j,1,m){
		t=0ll;
		per(i,n-1,1){
			t=(t+C[n-i-1][m-j]*C[i][m-j-1])%p;
			s=(s+t*(C[i-1][j]*C[n-i][j-1]%p))%p;
			//ERR("t=%lld s=%lld\n",t,s);
		}
	}
	//ERR("s=%lld\n",s);
	swap(n,m);
	REP(j,1,m){
		t=0ll;
		per(i,n-2,1){
			t=(t+C[m-j][n-i-2]*C[m-j-1][i+1])%p;
			s=(s+t*(C[j][i-1]*C[j-1][n-i]%p))%p;
		}
	}
	//ERR("s=%lld\n",s);
	printf("%lld\n",s*2ll%p);
}
/*
0. int overflow, array bounds
1. special cases (n=1? n=0?)
2. do smth instead of nothing and stay organized
3. WRITE STUFF DOWN
4. DON'T GET STUCK ON ONE APPROACH
5. STAY CALM AND DON'T GET EXPLODED
*/
