#include <bits/stdc++.h>

#define debug(...) fprintf(stderr ,__VA_ARGS__)
#define __FILE(x)\
	freopen(#x".in" ,"r" ,stdin);\
	freopen(#x".out" ,"w" ,stdout)
#define LL long long

const int MX = 4100 + 2;
const LL MOD = 998244353;

int read(){
	char k = getchar(); int x = 0;
	while(k < '0' || k > '9') k = getchar();
	while(k >= '0' && k <= '9') x = x * 10 + k - '0' ,k = getchar();
	return x;
}

void add(int &a ,int b){a += b - MOD; a += (a >> 31) & MOD;}
int sum(int a ,int b){add(a ,b); return a;}

int C[MX][MX];
void init(){
	for(int i = 0 ; i < MX ; ++i) C[i][0] = 1;
	for(int i = 1 ; i < MX ; ++i){
		for(int j = 1 ; j < MX ; ++j){
			C[i][j] = sum(C[i - 1][j - 1] ,C[i - 1][j]);
		}
	}
}

int way(int x ,int y){
	x = std::abs(x);
	y = std::abs(y);
	return C[x + y][x];
}
int way(int x1 ,int y1 ,int x2 ,int y2){
	return way(x2 - x1 ,y2 - y1);
}


int n ,m;
namespace BRUTE{
	int mp[MX][MX];
	bool check(){
		for(int i = 1 ; i <= n ; ++i){
			int seg = 0 ,cnt = 0;
			for(int j = 1 ; j <= m ; ++j){
				if(mp[i][j] == 0){
					if(cnt) ++seg ,cnt = 0;
				}
				else ++cnt;
			}
			if(cnt) ++seg;
			if(seg != 1) return false;
		}
		for(int j = 1 ; j <= m ; ++j){
			int seg = 0 ,cnt = 0;
			for(int i = 1 ; i <= n ; ++i){
				if(mp[i][j] == 1){
					if(cnt) ++seg ,cnt = 0;
				}else ++cnt;
			}
			if(cnt) ++seg;
			if(seg != 1) return false;
		}
		return true;
	}
	int ac;
	void dfs(int x ,int y){
		if(y == m + 1) return dfs(x + 1 ,1);
		if(x == n + 1){
			if(check()){
				check();
				++ac;
				for(int i = 1 ; i <= n ; ++i){
					for(int j = 1 ; j <= m ; ++j){
						debug("%d" ,mp[i][j]);
					}
					debug("\n");
				}
				debug("============\n");
			}
			return;
		}
		dfs(x ,y + 1);
		mp[x][y] = 1;
		dfs(x ,y + 1);
		mp[x][y] = 0;
	}
	int main(){
		dfs(1 ,1);
		debug("total = %d\n" ,ac);
		return 0;
	}
}
int main(){
	init();
	n = read() ,m = read();
	// return BRUTE::main();
	int ans = 0;
	for(int i = 1 ; i < m ; ++i){ // 假设 i -> i + 1 是分界点
		int s = 0;
		for(int j = 1 ; j < n ; ++j){
			add(s ,1LL * way(j - 1 ,i ,0 ,m) * way(j ,i + 2 ,n ,m + 1) % MOD);
			add(ans ,1LL * s * way(1 ,0 ,j + 1 ,i - 1) % MOD * way(n + 1 ,1 ,j + 2 ,i + 1) % MOD);
		}
	}
	std::swap(n ,m);
	for(int i = 1 ; i < m ; ++i){ // 假设 i -> i + 1 是分界点
		int s = 0;
		for(int j = 1 ; j < n ; ++j){
			add(ans ,1LL * s * way(1 ,0 ,j + 1 ,i - 1) % MOD * way(n + 1 ,1 ,j + 2 ,i + 1) % MOD);
			add(s ,1LL * way(j - 1 ,i ,0 ,m) * way(j ,i + 2 ,n ,m + 1) % MOD);
		}
	}
	add(ans ,ans);
	printf("%d\n" ,ans);
	return 0;
}