#include <iostream>
#include <sstream>
#include <iomanip>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <vector>
#include <bitset>
#include <string>
#include <cstring>
#include <cmath>
#include <cstdio>
#define all(v) (v).begin(), (v).end()
#define unq(v) (v).erase(unique(all(v)), (v).end())
#define ii int, int
#define li ll, int
#define ll2 ll, ll
#define vec vector
#define pii pair <int, int>
#define pli pair <ll, int>
#define pil pair <int, ll>
#define pll2 pair <ll, ll>
#define mp make_pair
#define pb push_back
#define fi first
#define se second
#define MULTI int T; cin >> T; while(T--)
#define sqr(x) ((x) * (x))
#define test cerr << '!' << endl;
using namespace std;

typedef long long ll;
typedef unsigned long long ull;

void main0 ();
int main () {
	clock_t start, end;
	#ifndef ONLINE_JUDGE
		freopen("C:\\Users\\98497\\Desktop\\code\\file.in", "r", stdin);
		start = clock();
	#endif
	ios::sync_with_stdio(false); cin.tie(0);
	main0();
	#ifndef ONLINE_JUDGE
		end = clock();
		cout << "( "<<(end - start) << " ms )" << endl;
		fclose(stdin);
	#endif
	return 0;
}

const int dx[8] = {0, 1, -1, 0, 1, 1, -1, -1};
const int dy[8] = {1, 0, 0, -1, 1, -1, -1, 1};
const int N = 2025;
const int M = 5e3 + 5;
const int INF = 0x3f3f3f3f;
const ll INFF = 0x3f3f3f3f3f3f3f3f;
const int mod = 998244353;
const double eps = 1e-6;
const double Pi = acos(-1.0);

ll c[M][M];
void init () {
	for (int i = 0;i < M;++i) {
		c[i][0] = c[i][i] = 1;
	}
	for (int i = 2;i < M;++i) {
		for (int j = 1;j < i;++j) {
			c[i][j] = (c[i - 1][j - 1] + c[i - 1][j]) % mod;
		}
	}
}

ll a[N][N];
ll pre[N][N];

void main0 () {
	init();
	
	int n, m;
	cin >> n >> m;
	ll ans = 0;
	for (int i = 1;i <= m - 1;++i) {
		for (int j = 1;j <= n;++j) {
			a[i][j] = c[i + j - 1][j - 1] * c[i - 1 + n - j][n - j] % mod;
			pre[i][j] = (pre[i][j - 1] + a[i][j]) % mod;
			//cout << i << ' ' << j << ':' << a[i][j] << ' ' << pre[i][j] << endl;
		}
	}
	for (int i = 1;i <= m - 1;++i) {
		for (int j = 1;j <= n;++j) {
			ans = (ans + pre[i][j] * a[m - i][n - j]) % mod;
			//cout << i << ' ' << j << ':' << pre[i][j] << '*' << a[m - i][n - j] << '=' << pre[i][j] * a[m - i][n - j] << endl;
		}
	}
	
	swap(n, m);
	for (int i = 1;i <= m - 1;++i) {
		for (int j = 1;j <= n;++j) {
			a[i][j] = c[i + j - 1][j - 1] * c[i - 1 + n - j][n - j] % mod;
			pre[i][j] = (pre[i][j - 1] + a[i][j]) % mod;
			//cout << i << ' ' << j << ':' << a[i][j] << ' ' << pre[i][j] << endl;
		}
	}
	for (int i = 1;i <= m - 1;++i) {
		for (int j = 1;j <= n;++j) {
			ans = (ans + pre[i][j - 1] * a[m - i][n - j]) % mod;
			//cout << i << ' ' << j << ':' << pre[i][j - 1] << '*' << a[m - i][n - j] << '=' << pre[i][j - 1] * a[m - i][n - j] << endl;
		}
	}
	
	cout << ans * 2 % mod << endl;
}