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; }
// ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- ----- //

void solve(){
	Finite.mod = 998244353;
	long n = read.to!long;
	long a = read.to!long;
	long b = read.to!long;
	long k = read.to!long;
	
	Finite ans = Finite(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;
		ans += pascal(i, n - i) * pascal(j, n - j);
	}
	
	ans.writeln;
}


import std.conv;
struct Finite{
	ulong value; static ulong mod = 1_000_000_007;
	private static ulong[] _inv = [0, 1], _frac = [1, 1], _invfrac = [1, 1];
	this(ulong v){ value = v % mod; }
	bool opCast(T: bool)(){ return value != 0; }
	Finite opUnary(string s){ ulong v;
		if(s == "+") v = value;
		else if(s == "-") v = mod - value;
		else if(s == "++") v = value + 1;
		else if(s == "--") v = value + mod - 1;
		else assert(0, "Operator unary " ~ s ~ " not implemented");
		return Finite(v);
	}
	Finite opBinary(string s)(Finite b){
		return opBinary!s(b.value);
	}
	Finite opBinary(string s)(ulong u){ ulong v;
		if(s == "+") v = value + u;
		else if(s == "-") v = value + mod - u;
		else if(s == "*") v = value * u;
		else if(s == "/") v = value * inv(u);
		else assert(0, "Operator " ~ s ~ " not implemented");
		return Finite(v);
	}
	Finite opBinaryRight(string s)(ulong u){ ulong v;
		if(s == "+") v = u + value;
		else if(s == "-") v = u + mod - value;
		else if(s == "*") v = u * value;
		else if(s == "/") v = u * invvalue;
		else assert(0, "Operator " ~ s ~ " not implemented");
		return Finite(v);
	}
	Finite opAssign(ulong v){ value = v; return this; }
	Finite opOpAssign(string s)(Finite b){
		return opOpAssign!s(b.value);
	}
	Finite opOpAssign(string s)(ulong v){
		if(s == "+") value = (value + v) % mod;
		else if(s == "-") value = (value + mod - v) % mod;
		else if(s == "*") value = (value * v) % mod;
		else if(s == "/") value = (value * inv(v)) % mod;
		else assert(0, "Operator " ~ s ~ "= not implemented");
		return this;
	}
	bool opEquals(Finite b){
		return(value == b.value);
	}
	string toString(){ return value.to!string; }
	ulong inv(ulong v){
		assert(v > 0);
		assert(v < mod);
		while(v >= _inv.length){
			_inv ~= _inv[mod % $] * (mod - mod / _inv.length) % mod;
		}
		return _inv[v];
	}
	ulong invvalue(){
		return inv(value);
	}
	static Finite opCall(ulong v){
		return Finite(v);
	}
	
}

// ---以下はユーティリティ--- //

// mod p における階乗
Finite perm(ulong x){
	static Finite[] _perm = [];
	if(_perm.length == 0) _perm ~= Finite(1);
	while(x >= _perm.length)
			_perm ~= _perm[$ - 1] * _perm.length;
	return _perm[x];
}

// mod p における階乗の逆元 ※階乗で割るときは必ずこれを使うこと
Finite invperm(ulong x){
	static Finite[] _invperm = [];
	if(_invperm.length == 0) _invperm ~= Finite(1);
	while(x >= _invperm.length)
			_invperm ~= _invperm[$ - 1] / _invperm.length;
	return _invperm[x];
}

// mod p における二項係数（定義に注意：(a + b)! / a! / b! ）
Finite pascal(ulong a, ulong b){
	Finite res = perm(a + b) * invperm(a) * invperm(b);
	return res;
}



Measured memory_bytes: 11516