#include <bits/stdc++.h>
using namespace std;

const int maxn = 2100;
const int maxm = 4200;
typedef long long ll;
const int inf = 2147483647;
const int mod = 998244353;

int c[maxm][maxm],sum[maxn];

int cal(int n,int m){
	int ans=0;
	for(int h=1;h<=n-1;++h){
		for(int j=1;j<=m;++j){
			sum[j]=(sum[j-1]+1ll*c[n-h+j-2][j-1]*c[n-h+m-j][n-h]%mod)%mod;
		}
		for(int i=1;i<=m-2;++i){
			ans=(ans+1ll*c[h+i-1][h]*c[h+m-i-1][h-1]%mod*((sum[m]-sum[i+1])%mod)%mod)%mod;
		}
	}
	ans=(ans%mod+mod)%mod;
	ans=2ll*ans%mod;
	return ans;
}
int main(){
	c[0][0]=1;
	for(int i=1;i<maxm;++i){
		c[i][0]=1;
		for(int j=1;j<maxm;++j){
			c[i][j]=(c[i-1][j]+c[i-1][j-1])%mod;
		}
	}
	int n,m;
	scanf("%d%d",&n,&m);
	int ans=(cal(n,m)%mod+cal(m,n)%mod)%mod,as=0;
	for(int h=1;h<=n-1;++h){
		for(int i=1;i<=m-1;++i){
			int j=i+1;
			as=(as+1ll*c[h+i-1][h]*c[h+m-i-1][h-1]%mod*c[n-h+j-2][j-1]%mod*c[n-h+m-j][n-h]%mod)%mod;
		}
	}
	as=2ll*as%mod;
	ans=(ans+as)%mod;
	printf("%d\n",ans);
} 