#include typedef long long ll; #define f(i,n) for(ll i=0;i #define F first #define S second #define mod 1000000007 #define Mod 998244353 #define all(v) v.begin(), v.end() #define INF LLONG_MAX/3 #define pi 3.14159265359 using namespace std; ll k[300000]; int mypow(ll a,ll b,ll c) { if (b == 0)return 1; if (b % 2)return mypow(a, b - 1, c)*a%c; ll fa = mypow(a, b / 2, c); return fa * fa%c; } int nCr(int a, int b) { return k[a] * mypow(k[b], Mod - 2, Mod) % Mod * mypow(k[a - b], Mod - 2, Mod) % Mod; } int main() { ll a, b, c, d, ans = 0; cin >> a >> b >> c >> d; ll z = d - (a - 1)*(c - 1), x = b - d; k[0] = 1; f(i, max(a,z)) { k[i + 1] = k[i] * (i + 1); } for (; z >= a - 1; z--) { ans += nCr(z-1, a - 2)*x%Mod; ans %= Mod; x++; } cout << ans * k[a] % Mod << endl; ggr; }