import std.stdio, std.conv, std.string, std.array, std.range, std.algorithm, std.container;
import std.math, std.random, std.bigint, std.datetime, std.format;
void main(string[] args){ if(args.length > 1) if(args[1] == "-debug") DEBUG = 1; solve(); }
void log()(){ writeln(""); } void log(T, A ...)(T t, lazy A a){ if(DEBUG) write(t, " "), log(a); } bool DEBUG = 0; 
string read(){ static string[] ss; while(!ss.length) ss = readln.chomp.split; string res = ss[0]; ss.popFront; return res; }
// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- //

const long mod = 998244353;

void solve(){
	long n = read.to!long;
	long a = read.to!long;
	long b = read.to!long;
	long k = read.to!long;
	
	long[] perm = new long[](n + 1);
	foreach(i; 0 .. n + 1){
		if(i == 0) perm[i] = 1;
		else perm[i] = perm[i - 1] * i % mod;
	}
	log("perm:", perm);
	
	long[] inv = new long[](n + 1);
	foreach(i; 0 .. n + 1){
		if(i <= 1) inv[i] = 1;
		else inv[i] = inv[mod % i] * (mod - mod / i) % mod;
	}
	log("inv:", inv);
	
	long[] invperm = new long[](n + 1);
	foreach(i; 0 .. n + 1){
		if(i <= 1) invperm[i] = 1;
		else invperm[i] = invperm[i - 1] * inv[i] % mod;
	}
	log("invperm:", invperm);
	log("product:", (n + 1).iota.map!(i => perm[i] * invperm[i] % mod));
	
	long ans = 0;
	for(long i = 0; i <= n; i ++){
		if(i * a > k) break;
		if((k - i * a) % b != 0) continue;
		long j = (k - i * a) / b;
		if(j > n) continue;
		long p1 = perm[n] * (invperm[i] * invperm[n - i] % mod) % mod;
		long p2 = perm[n] * (invperm[j] * invperm[n - j] % mod) % mod;
		ans += p1 * p2 % mod, ans %= mod;
	}
	
	ans.writeln;
}

