#include<bits/stdc++.h>
using namespace std;
using ll = int64_t;
const ll MOD = 998244353;
ll fact[3 * (ll)1e5 + 1] = {1};
ll po(ll a, ll b){return b ? (b & 1 ? a : 1) * po(a * a % MOD, b / 2) % MOD : 1;}
ll comb(ll n, ll k){return fact[n] * po(fact[k] * fact[n - k] % MOD, MOD - 2) % MOD;}
int main(){
    for(ll i = 1; i <= 3 * 1e5; i++) fact[i] = i * fact[i - 1] % MOD;
    ll N, A, B, K;
    cin >> N >> A >> B >> K;
    ll ans = 0;
    for(ll a = 0; a <= N; a++){
        if(K - a * A < 0) continue;
        if((K - a * A) % B) continue;
        ll b = (K - a * A) / B;
        if(max(a, b) > N) continue;
        ll add = comb(N, a) * comb(N, b);
        ans = (ans + add) % MOD;
    }
    cout << ans << endl;
    return 0;
}