#include<bits/stdc++.h>
#define LL long long
#define DB double
#define MOD 998244353
#define ls(x) x << 1
#define rs(x) x << 1 | 1
#define lowbit(x) x & (-x)
#define PII pair<int, int>
#define MP make_pair
#define VI vector<int>
#define VII vector<int>::iterator
#define all(x) x.begin(), x.end()
#define EB emplace_back
#define SI set<int>
#define SII set<int>::iterator
#define QI queue<int>
using namespace std;
template<typename T> void chkmn(T &a, const T &b) { (a > b) && (a = b); }
template<typename T> void chkmx(T &a, const T &b) { (a < b) && (a = b); }
int inc(const int &a, const int &b) { return a + b >= MOD ? a + b - MOD : a + b; }
int dec(const int &a, const int &b) { return a - b < 0 ? a - b + MOD : a - b; }
int mul(const int &a, const int &b) { return 1LL * a * b % MOD; }
int sqr(const int &a) { return 1LL * a * a % MOD; }
void Inc(int &a, const int &b) { ((a += b) >= MOD) && (a -= MOD); }
void Dec(int &a, const int &b) { ((a -= b) < 0) && (a += MOD); }
void Mul(int &a, const int &b) { a = 1LL * a * b % MOD; }
void Sqr(int &a) { a = 1LL * a * a % MOD; }
int qwqmi(int x, int k = MOD - 2)
{
int res = 1;
while(k)
{
if(k & 1) Mul(res, x);
Sqr(x), k >>= 1;
}
return res;
}
const int N = 8e5 + 5;
int fac[N], facinv[N];
void preprocess()
{
fac[0] = facinv[0] = 1;
for(int i = 1; i < N; ++i)
fac[i] = mul(fac[i - 1], i);
facinv[N - 1] = qwqmi(fac[N - 1]);
for(int i = N - 2; i >= 1; --i)
facinv[i] = mul(facinv[i + 1], i + 1);
}
int C(int n, int m)
{
if(n < m || n < 0 || m < 0) return 0;
return mul(fac[n], mul(facinv[m], facinv[n - m]));
}
int n, m, ans = 0;
int calc1(int x, int y)
{
if(x < 1 || x > n || y < 1 || y > m) return 0;
int w = 1;
Mul(w, C(x - 1 + y - 1, x - 1));
Mul(w, C(n - x + y - 1, n - x));
Mul(w, C(x - 1 + y - 1 + n - x + y - 1, x - 1 + y - 1));
return w;
}
int calc2(int x, int y)
{
if(x < 1 || x > n || y < 1 || y > m) return 0;
int w = 1;
Mul(w, C(x - 1 + m - y, x - 1));
Mul(w, C(n - x + m - y, n - x));
Mul(w, C(x - 1 + m - y + n - x + m - y, x - 1 + m - y));
return w;
}
int Catalan(int x)
{
if(x < 0) return 0;
if(x == 0) return 1;
return dec(C(2 * x, x), C(2 * x, x + 1));
}
int main()
{
preprocess();
scanf("%d %d", &n, &m);
for(int x = 1; x <= n; ++x)
for(int y = 1; y <= m; ++y)
{
int w1 = calc1(x, y);
for(int i = 1; i < y; ++i)
Dec(w1, mul(calc1(x, i), mul(2, Catalan(y - i - 1))));
int w2 = calc2(x, y);
for(int i = y + 1; i <= m; ++i)
Dec(w2, mul(calc2(x, i), mul(2, Catalan(i - y - 1))));
// printf("%d %d %d %d\n", x, y, w1, w2);
Inc(ans, mul(w1, w2));
}
printf("%d\n", ans);
return 0;
}