#include <iostream>
#include <cstdio>
#include <cmath>
#include <string>
#include <cstring>
#include <set>
#include <map>
#include <vector>
#include <queue>
#include <algorithm>
#include <ctime>

using namespace std;

const long long MOD = 998244353;

const int maxN = 2030;

long long cnk[2 * maxN][2 * maxN];

void fillcnk() {
	cnk[0][0] = 1;
	for (int i = 1; i < 2 * maxN; ++i) {
		cnk[i][0] = 1;
		for (int j = 1; j <= i; ++j) {
			cnk[i][j] = cnk[i - 1][j - 1] + cnk[i - 1][j];
			if (cnk[i][j] >= MOD) {
				cnk[i][j] -= MOD;
			}
		}
	}
}

void solve() {
	fillcnk();
	int n, m;
	cin >> n >> m;

	long long yellow = 0;
	long long both = 0;
	long long blue = 0;

	for (int i = 1; i < m; ++i) {
		long long totalbelow = 0;
		for (int j = n - 1; j >= 1; --j) {
			long long side1 = cnk[(i - 1) + (n - j)][i - 1];
			long long side2 = cnk[j - 1 + i][i];

			if (j + 1 < n) {
				long long side3 = cnk[(j + 1) + (m - i - 1)][m - i - 1];
				long long side4 = cnk[n - (j + 2) + (m - i)][m - i];
				totalbelow += (side3 * side4) % MOD;
				totalbelow %= MOD;
				yellow += (side1 * side2) % MOD * totalbelow;
				yellow %= MOD;
			}

			long long side3 = cnk[m - (i + 1) + j][j];
			long long side4 = cnk[n - (j + 1) + (m - i)][m - i];
			both += ((side1 * side2) % MOD) * ((side3 * side4) % MOD);
			both %= MOD;
		}
	}

	swap(n, m);
	for (int i = 1; i < m; ++i) {
		long long totalbelow = 0;
		for (int j = n - 1; j >= 1; --j) {
			long long side1 = cnk[(i - 1) + (n - j)][i - 1];
			long long side2 = cnk[j - 1 + i][i];

			if (j + 1 < n) {
				long long side3 = cnk[(j + 1) + (m - i - 1)][m - i - 1];
				long long side4 = cnk[n - (j + 2) + (m - i)][m - i];
				totalbelow += (side3 * side4) % MOD;
				totalbelow %= MOD;
				blue += (side1 * side2) % MOD * totalbelow;
				blue %= MOD;
			}
		}
	}

	cout << (yellow * 2 + blue * 2 + both * 2) % MOD << endl;
}

int main() {
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	int t;
	//cin >> t;
	t = 1;


	for (int tt = 0; tt < t; ++tt) {
		solve();
	}




	return 0;

}