# include <bits/stdc++.h>
# define LL long long 
const LL N=2050,mod=998244353;
LL fac[N<<1],inv[N<<1];
LL ksm(LL a,LL k){
	LL re=1;
	while(k){
		if(k&1) re=re*a%mod;
		a=a*a%mod;k>>=1;
	}return re;
}LL f(LL n,LL k){return 1ll*fac[n+k-1]*inv[k]%mod*inv[n-1]%mod;}

LL sum[N];
LL calc(LL n,LL m){
	LL ans=0;
	memset(sum,0,sizeof(sum));
	for(LL h=1;h<=m-1;h++){
		for(LL r=n;r>=1;r--) sum[r]=(sum[r+1]+1ll*f(r,m-h-1)*f(n-r+1,m-h)%mod)%mod;
		for(LL l=1;l<=n-2;l++) ans+=1ll*f(l,h)*f(n-l+1,h-1)%mod*sum[l+2]%mod;
	}ans=ans*2%mod;
	return ans;
}

signed main(){
	# ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
	# endif
	LL n,m;scanf("%lld %lld",&n,&m);
	for(LL i=fac[0]=inv[0]=1;i<N*2;i++) fac[i]=1ll*fac[i-1]*i%mod,inv[i]=ksm(fac[i],mod-2);
	LL ans=(calc(n,m)+calc(m,n))%mod;
	for(LL h=1;h<=m-1;h++)
	for(LL l=1;l<=n-1;l++)
	(ans+=2ll*f(l,h)*f(n-l+1,h-1)%mod*f(l+1,m-h-1)%mod*f(n-l,m-h)%mod)%=mod;
	printf("%lld\n",ans);
	return 0;
}