#include<cstdio>
#include<algorithm>
using namespace std;
#define MAXN 300000
#define LL long long
#define MO 998244353
LL fac[MAXN+5],inv[MAXN+5];
LL powmod(LL a,LL b)
{
	LL ret=1;
	while(b)
	{
		if(b&1) ret=ret*a%MO;
		a=a*a%MO;
		b>>=1;
	}
	return ret;
}
void Init()
{
	fac[0]=inv[0]=1;
	for(int i=1;i<=MAXN;i++)
		fac[i]=i*fac[i-1]%MO;
	inv[MAXN]=powmod(fac[MAXN],MO-2);
	for(int i=MAXN-1;i>=1;i--)
		inv[i]=(i+1)*inv[i+1]%MO;
}
LL n,A,B,k,x,y,d,tot;
LL Solve(int i,int j)
{
	return inv[i]*inv[j]%MO*inv[n-i]%MO*inv[n-j]%MO;
}
int main()
{
	Init();
	scanf("%lld%lld%lld%lld",&n,&A,&B,&k);
	LL ans=0;
	for(int i=0;i<=n&&i*A<=k;i++)
	{
		LL L=k-A*i;
		if(L%B==0&&L/B<=n)
		{
			ans+=Solve(i,L/B);
			if(ans>=MO) ans-=MO;
		}
	}
	printf("%lld\n",ans*fac[n]%MO*fac[n]%MO);
}