#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

const int mod = 998244353;
const int M = 3e5 + 50;

#define rush() int T;cin>>T;while(T--)


ll fac[M]={1,1},inv[M]={1,1},f[M]={1,1};

ll C(ll a,ll b){
    if(b>a)return 0;
    return fac[a]*inv[b]%mod*inv[a-b]%mod;
}

void init(){//快速计算阶乘的逆元
    for(int i=2;i<M;i++){
        fac[i]=fac[i-1]*i%mod;
        f[i]=(mod-mod/i)*f[mod%i]%mod;
        inv[i]=inv[i-1]*f[i]%mod;
    }
}

int main() {
	
	init();
	ll n,a,b,k;
	scanf("%lld %lld %lld %lld",&n,&a,&b,&k);
	
	ll ans = 0;
	
	for(int i=0;i<=n;i++) { // x
		ll y = (k - a*i) / b;
		if( k < a*i || ((k - a*i) % b) || y > n) continue;
		ans = ( ans + C(n,i) * C(n,y) )% mod;
	}
	
	cout<<ans;
	
}


