#include<stdio.h>
int main(void){
  char *s="python3 -c\""
"n,a,b,k=map(int,input().split())\n"
"m=998244353\n"
"I=[0]*n\n"
"for i in range(n):\n"
"  I[i]=pow(i+1,m-2,m)\n"
"c=[0]*(n+1)\n"
"c[0]=1\n"
"for i in range(1,n+1):\n"
"  c[i]=(c[i-1]*(n-i+1)*I[i-1])%m\n"
"q=0\n"
"for i in range(n+1):\n"
"  j=(k-i*a)//b\n"
"  if (k-i*a)%b or j<0 or j>n:continue\n"
"  q=(q+c[i]*c[j])%m \n"
"print(q%m)\n"
"\"";
  system(s);
  return 0;
}            