#line 1 "a.cpp" #include using namespace std; #line 3 "/home/kotatsugame/library/math/modint.cpp" #include template struct modint{ unsigned int x; constexpr modint()noexcept:x(){} constexpr modint(long long _x)noexcept:x((_x%=m)<0?_x+m:_x){} constexpr unsigned int val()const noexcept{return x;} constexpr modint&operator++()noexcept{if(++x==m)x=0;return*this;} constexpr modint&operator--()noexcept{if(x==0)x=m;--x;return*this;} constexpr modint operator++(int)noexcept{modint res=*this;++*this;return res;} constexpr modint operator--(int)noexcept{modint res=*this;--*this;return res;} constexpr modint&operator+=(const modint&a)noexcept{x+=a.x;if(x>=m)x-=m;return*this;} constexpr modint&operator-=(const modint&a)noexcept{if(x>=1)if(n&1)r*=x; return r; } constexpr modint inv()const noexcept { int s=x,t=m,x=1,u=0; while(t) { int k=s/t; s-=k*t; swap(s,t); x-=k*u; swap(x,u); } return modint(x); } constexpr modint operator+(const modint&a)const noexcept{return modint(*this)+=a;} constexpr modint operator-(const modint&a)const noexcept{return modint(*this)-=a;} constexpr modint operator*(const modint&a)const noexcept{return modint(*this)*=a;} constexpr modint operator/(const modint&a)const noexcept{return modint(*this)/=a;} constexpr bool operator==(const modint&a)const noexcept{return x==a.x;} constexpr bool operator!=(const modint&a)const noexcept{return x!=a.x;} friend ostream&operator<<(ostream&os,const modint&a){return os<>(istream&is,modint&a){long long v;is>>v;a=modint(v);return is;} }; #line 4 "a.cpp" using mint=modint<998244353>; int N,M,A,B; mint fac[4<<17],inv[4<<17]; mint comb(int a,int b){return fac[a]*inv[b]*inv[a-b];} main() { cin>>N>>M>>A>>B; fac[0]=1; for(int i=1;i<4<<17;i++)fac[i]=fac[i-1]*i; inv[(4<<17)-1]=fac[(4<<17)-1].inv(); for(int i=(4<<17)-1;i--;)inv[i]=inv[i+1]*(i+1); if((long)(N-1)*A>B) { cout<<0<