#include using namespace std; using ll = long long; const int MX = 400010; ll f[MX],inv[MX],fi[MX]; constexpr ll mod = 998244353; void solve(){ inv[1] = 1; for(int i=2;i> c >> x; solve(); if(x==0){ if(c>0) cout << inv[c + 1] << endl; else cout << 0 << endl; } else if(c>=x){ cout << inv[x] << endl; return 0; }else{ dp[0][0] = 1; int las = 0; for(i=1;i<=2000;i++){ if(c + i>x) break; for(j=0;j<=x;j++){ dp[i][j] = inv[c + i]*j%mod*dp[i - 1][j]%mod; if(j && (c + i + 1 - j)>=0) dp[i][j] += inv[c + i]*(c + i + 1 - j)%mod*dp[i - 1][j - 1]%mod; } las = i; } ll ans = 0; // for(j=0;j<=x;j++){ // cout << inv[x - j + 1] << " " << dp[las][j] << endl; // } for(j=0;j<=x;j++) (ans += inv[x - j + 1]*dp[las][j]%mod) %= mod; cout << (mod + 1 - ans)%mod << "\n"; } }