import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.typecons, std.container;
import std.math, std.numeric, core.bitop;

enum mod = 998244353;

void main() {
    long n, a, b, k;
    scan(n, a, b, k);

    auto fact = new long[](n + 1);
    fact[0] = 1;
    foreach (i ; 1 .. n + 1) {
        fact[i] = (fact[i-1] * i) % mod;
    }
    auto rfact = new long[](n + 1);
    rfact[n] = powmod(fact[n], mod - 2, mod);
    foreach_reverse (i ; 0 .. n) {
        rfact[i] = (rfact[i+1] * (i + 1)) % mod;
    }

    long comb(long n, long k) {
        return fact[n] * rfact[k] % mod * rfact[n-k] % mod;
    }

    long ans;

    foreach (i ; 0 .. n + 1) {
        if ((k - i*a) % b != 0) continue;
        long j = (k - i*a) / b;
        if (j < 0 || j > n) continue;
        ans += comb(n, i) * comb(n, j) % mod;
        ans %= mod;
    }

    writeln(ans);
}


long powmod(long x, long y, long m) {
    return y > 0 ? powmod(x, y>>1, m)^^2 % m * x^^(y&1) % m : 1;
}





































void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
