from math import comb H, W = map(int, input().split()) mod = 998244353 ans = 0 for i in range(H + W): x = i // 2 y = i // 2 + i % 2 if x <= H - 2 and y <= W - 1: ans += pow(2, (H - 1) * (W - 1) - i, mod) * comb(H - 2, x) * comb(W - 1, y) % mod print(ans % mod)