#include <algorithm>
#include <array>
#include <cassert>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <map>
#include <memory>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <sstream>
#include <unordered_map>
#include <vector>


#define INF 4000000000000000000LL
#define MOD 998244353
#define ALL(x) std::begin(x), std::end(x)


class modint_t;


modint_t modpow(long long x, long long y);


class modint_t {
  friend std::ostream& operator<<(std::ostream& ofs, const modint_t a);

public:
  modint_t(long long xx = 0) : x(xx % MOD) {};

public:
  bool operator==(modint_t a) const {
    return x == a.x;
  };

  bool operator!=(modint_t a) const {
    return ! (*this == a);
  };

public:
  modint_t operator+(const modint_t& a) const {
    return (x + a.x) % MOD;
  };

  modint_t operator-(const modint_t& a) const {
    return (x - a.x) % MOD;
  };

  modint_t operator*(const modint_t& a) const {
    return x * a.x % MOD;
  };

  modint_t operator/(const modint_t& a) const {
    return (*this) * a.inverse();
  };

  // Note that operator^'s priority is quite low in C++...
  modint_t operator^(long long i) const {
    return modpow(x, i);
  };

public:
  modint_t& operator+=(const modint_t& a) {
    (x += a.x) %= MOD;

    return *this;
  };

  modint_t& operator-=(const modint_t& a) {
    (x -= a.x) %= MOD;

    return *this;
  };

  modint_t& operator*=(const modint_t& a) {
    (x *= a.x) %= MOD;

    return *this;
  };

  modint_t& operator/=(const modint_t& a) {	// Not tested
    (x *= a.inverse().x) %= MOD;

    return *this;
  };

public:
  modint_t inverse() const {
    assert(x % MOD);

    return modpow(x, MOD - 2);
  };

private:
  long long x;
};

modint_t operator+(long long a, const modint_t& b)
{
  return modint_t(a) + b;
}

modint_t operator-(long long a, const modint_t& b)
{
  return modint_t(a) - b;
}

modint_t operator*(long long a, const modint_t& b)
{
  return modint_t(a) * b;
}

modint_t operator/(long long a, const modint_t& b)
{
  return modint_t(a) / b;
}

std::ostream& operator<<(std::ostream& ofs, const modint_t a)
{
  ofs << a.x;

  return ofs;
}

modint_t modpow(long long x, long long y)
{
  modint_t xx = x, p = 1;

  for ( ; y; xx *= xx, y >>= 1)
    if (y & 1)
      p *= xx;

  return p;
}

modint_t modncr(int n, int r)
{
  assert(n >= 0);
  assert(r >= 0);

  if (n == 0)
    return r == 0 ? 1 : 0;

  if (r > n)
    return 0;

  modint_t c = 1;

  int dm = std::min(r, n - r);
  int dp = std::max(r, n - r);

  for (int i = dp + 1; i <= n; i ++)
    c *= i;

  for (int i = 2; i <= dm; i ++)
    c *= modpow(i, MOD - 2);

  return c;
}

class modncr_t {
public:
  std::vector<modint_t> compute(int n) const {
    std::vector<modint_t> a(n + 1);

    a[0] = a[n] = 1;

    for (int i = 1; i <= n / 2; i ++)
      a[i] = a[n - i] = a[i - 1] * (n - (i - 1)) * modpow(i, MOD - 2);

    return std::move(a);
  };
};


int main(int argc, char** argv)
{
  std::cin.tie(0);
  std::ios_base::sync_with_stdio(0);

  std::cout << std::fixed << std::setprecision(6);
  std::cerr << std::fixed << std::setprecision(6);

  int N;

  modncr_t ncr;

  long long A, B, K;

  std::cin >> N >> A >> B >> K;

  std::vector<modint_t> a = ncr.compute(N);

  modint_t C = 0;

  for (long long i = 0; i <= N; i ++) {
    long long r = K - A * i;

    if (r < 0)
      break;

    if (r % B)
      continue;

    long long j = r / B;

    if (j > N)
      continue;

    C += a[i] * a[j];
  }

  std::cout << C << std::endl;

  return 0;
}


Measured memory_bytes: 2560