#include <bits/stdc++.h>
#define forn(i,s,t) for(register int i=(s);i<=(t);++i)
#define form(i,s,t) for(register int i=(s);i>=(t);--i)
using namespace std;
const int N = 2040, Mod = 998244353;
struct Mint {
	int res;
	Mint() {res = 0;}
	Mint(int a) : res(a) {}
	friend Mint operator + (Mint A, Mint B) {
		return Mint((A.res + B.res >= Mod) ? (A.res + B.res - Mod) : (A.res + B.res));
	}
	friend Mint& operator += (Mint& A, Mint B) {return A = A + B;}
	friend Mint operator - (Mint A, Mint B) {B.res = Mod - B.res; return A + B;}
	friend Mint operator - (Mint A) {return Mint(Mod - A.res);}
	friend Mint operator + (Mint A) {return A;}
	friend Mint& operator -= (Mint& A, Mint B) {return A = A - B;}
	friend Mint operator * (Mint A, Mint B) {return 1ll * A.res * B.res %Mod;}
	friend Mint& operator *= (Mint& A, Mint B) {return A = A * B;}
	friend Mint operator ~ (Mint A) {
		static Mint res; res = Mint(1);
		static int k; k = Mod - 2;
		for(;k;k>>=1, A*=A) (k&1) && (res = res * A, 0);
		return res;
	}
	friend Mint operator / (Mint A, Mint B) {return A * (~B);}
	friend Mint& operator /= (Mint& A, Mint B) {return A *= (~B);}
	friend Mint operator >> (Mint A, Mint B) {return Mint(A.res / B.res);}
	friend Mint& operator >>= (Mint& A, Mint B) {return A = A>>B;}
};
int n, m; Mint C[N << 1][N << 1];
inline Mint F(int n, int m) {return C[n + m][n];}
int main() {
	scanf("%d%d", &n, &m);
	forn(i,0,n + m) {
		C[i][0] = C[i][i] = Mint(1);
		forn(j,1,i - 1) C[i][j] = C[i - 1][j] + C[i - 1][j - 1];
	}
	static Mint res, sum;
	forn(h,1,n - 1) {
		sum = Mint(0);
		forn(i,1,m - 1) {
			res += sum * F(i, h - 1) * F(m - i - 1, h);
			sum += F(n - h, i - 1) * F(n - h - 1, m - i);
		}
	}
	forn(h,1,m - 1) {
		sum = Mint(0);
		forn(i,1,n - 1) {
			sum += F(m - h, i - 1) * F(m - h - 1, n - i);
			res += sum * F(i, h - 1) * F(n - i - 1, h);
		}
	}
	res = res * Mint(2);
	printf("%d\n", res.res);
	return 0;
}