#include<bits/stdc++.h>
#define mod 998244353
using namespace std;
inline long long read(){
	long long x=0,f=1;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar();}
	return x*f;
}
long long a,b,n,k,ans,jie[300005];
long long ni(long long x){
	long long res=1,m=mod-2;
	while(m){
		if(m&1) m-=1,res=(res*x)%mod;
		else m>>=1,x=(x*x)%mod;
	}
	return res;
}
long long C(int m,int x){
	return (long long)((jie[m]*ni(jie[x])%mod)*ni(jie[m-x]))%mod;
} 
int main(){
	n=read(),a=read(),b=read(),k=read();
	register int i;jie[0]=1;
	for(i=1;i<=n;i++) jie[i]=(jie[i-1]*i)%mod;
	for(i=0;i<=n;i++)if((k-i*a)%b==0&&(k-i*a)/b<=n){
		ans=(ans+(C(n,i)*C(n,(k-i*a)/b))%mod)%mod;
		if(k-i*a-a<0) break;
	}
	printf("%lld\n",ans);
	return 0;
}
