#include using namespace std; using ll = long long; using pii = pair; using vi = vector; using vll = vector; using vvi = vector; using vs = vector; using vc = vector; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define all(a) (a).begin(), (a).end() template using min_pq = priority_queue, greater>; const int INF = 1e9; const ll LINF = 1e18; const ll mod=998244353; const long long MOD =998244353 ; const int MAX_C = 2000005; long long fact[MAX_C], inv_fact[MAX_C]; long long power(long long a, long long b, long long m) { long long res = 1; a %= m; while (b > 0) { if (b & 1) res = res * a % m; a = a * a % m; b >>= 1; } return res; } void init_comb() { fact[0] = 1; for (int i = 1; i < MAX_C; i++) fact[i] = fact[i-1] * i % MOD; inv_fact[MAX_C-1] = power(fact[MAX_C-1], MOD-2, MOD); for (int i = MAX_C-2; i >= 0; i--) { inv_fact[i] = inv_fact[i+1] * (i+1) % MOD; } } long long nCk(ll n, int k) { if (k < 0 || k > n) return 0; if(n> n >> m; ll ans=0; vll two(7001,1); ll want=1; rep(i,7000){ two[i+1]*=want; want*=2; want%=mod; } vector> seen(n+1,vector(m+1,false)); for(int i=1;i<=n;i++)for(int j=1;j<=m;j++){ ll cnt=two[i+j-2]; ll now=((cnt*(n-i+1))%mod)*((n-j+1)%mod); if(i==n&&j*2==m){ now/=2; } if(i*2==n&&j==m) now/=2; ans+=now; ans%=mod; } cout << ans << endl; }