#include <bits/stdc++.h>
#define fo(a,b,c) for (a=b; a<=c; a++)
#define fd(a,b,c) for (a=b; a>=c; a--)
#define C(n,m) (jc[n]*Jc[m]%mod*Jc[(n)-(m)]%mod)
#define add(a,b) a=((a)+(b))%mod
#define mod 998244353
#define Mod 998244351
#define ll long long
#define N 5000
//#define file
using namespace std;

int n,m,i,j,k,l;
ll ans;
ll jc[N+1],Jc[N+1];
int f[2022][2022],sum[2022][2022];
ll ans1,ans2;

ll qpower(ll a,int b) {ll ans=1; while (b) {if (b&1) ans=ans*a%mod;a=a*a%mod;b>>=1;} return ans;}

ll js(int n,int m) {return C(n+m-1,m-1);}
void work(int n,int m)
{
	fo(i,1,m)
	{
		fo(j,1,n)
		f[i][j]=js(j-1,i+1)*js(n-j,i)%mod,sum[i][j]=(sum[i][j-1]+f[i][j])%mod;
	}
	fo(i,1,m-1)
	{
		fo(j,1,n-1)
		{
			add(ans1,1ll*f[i][j]*sum[m-i][n-j-1]%mod*2);
			add(ans2,1ll*f[i][j]*f[m-i][n-j]%mod*2);
		}
	}
}

int main()
{
	#ifdef file
	freopen("CF1503E.in","r",stdin);
	#endif
	
	scanf("%d%d",&n,&m);
	jc[0]=1;
	fo(i,1,N) jc[i]=jc[i-1]*i%mod;
	Jc[N]=qpower(jc[N],Mod);
	fd(i,N-1,0) Jc[i]=Jc[i+1]*(i+1)%mod;
	
	work(n,m);
	work(m,n);
	
	ans=(ans1+ans2*qpower(2,Mod)%mod)%mod;
	printf("%lld\n",(ans+mod)%mod);
	
	fclose(stdin);
	fclose(stdout);
	return 0;
}