#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <vector>
#include <string>
#include <queue>
#include <deque>
#include <list>
#include <stack>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>

#define int long long
#define MOD 998244353

#define rep(i, n) for (int i = 0; i < (n); i++)
#define itrep(i, a) for (auto i = (a).begin(); i != (a).end(); i++)
#define REP(i, a, n) for (int i = (a); i <= (n); i++)
#define all(a) (a).begin(), (a).end()
#define mp(a, b) make_pair((a), (b))

using namespace std;

int dx[4] = { 1, 0, -1, 0 };
int dy[4] = { 0, -1, 0, 1 };

template<class T> void inputVector(vector<T>& v, int n) {
    v.resize(n);
    for (int i = 0; i < v.size(); i++) cin >> v[i];
}

class ModInt {
private:
    long long value;
    long long mod;

    long long calcModNum(long long value) {
	if (value < 0) {
	    long long times = (-value) / this->mod + 1;
	    value += this->mod * times;
	}
	return value % this->mod;
    }

    long long extgcd(long long a, long long b, long long &x, long long &y) {
	long long g = a;
	x = 1;
	y = 0;
	if (b != 0) {
	    g = extgcd(b, a % b, y, x);
	    y -= (a / b) * x;
	}
	return g;
    }

    long long modInverse(long long a, long long b) {
	long long x, y;
	extgcd(a, b, x, y);
	return x;
    }
public:
    // コンストラクタ
    ModInt(int value, int mod) {
	this->value = (long long)value;
	this->mod = (long long)mod;
    }

    // 値を返す
    int getValue() {
	return (int)this->value;
    }

    ModInt operator + (ModInt obj) {
	ModInt retObj(calcModNum(this->value + obj.value), this->mod);
	return retObj;
    }
    void operator += (ModInt obj) {
	this->value = calcModNum(this->value + obj.value);
    }
    ModInt operator + (int value) {
	ModInt retObj(calcModNum(this->value + (long long)value), this->mod);
	return retObj;
    }
    void operator += (int value) {
	this->value = calcModNum(this->value + (long long)value);
    }

    ModInt operator - (ModInt obj) {
	ModInt retObj(calcModNum(this->value - obj.value), this->mod);
	return retObj;
    }
    void operator -= (ModInt obj) {
	this->value = calcModNum(this->value - obj.value);
    }
    ModInt operator - (int value) {
	ModInt retObj(calcModNum(this->value - (long long)value), this->mod);
	return retObj;
    }
    void operator -= (int value) {
	this->value = calcModNum(this->value - (long long)value);
    }

    ModInt operator * (ModInt obj) {
	ModInt retObj(calcModNum(this->value * obj.value), this->mod);
	return retObj;
    }
    void operator *= (ModInt obj) {
	this->value = calcModNum(this->value * obj.value);
    }
    ModInt operator * (int value) {
	ModInt retObj(calcModNum(this->value * (long long)value), this->mod);
	return retObj;
    }
    void operator *= (int value) {
	this->value = calcModNum(this->value * (long long)value);
    }

    ModInt operator / (ModInt obj) {
	ModInt retObj(calcModNum(this->value * modInverse(obj.value, this->mod)), this->mod);
	return retObj;
    }
    void operator /= (ModInt obj) {
	this->value = calcModNum(this->value * modInverse(obj.value, this->mod));
    }
    ModInt operator / (int value) {
	ModInt retObj(calcModNum(this->value * modInverse(value, this->mod)), this->mod);
	return retObj;
    }
    void operator /= (int value) {
	this->value = calcModNum(this->value * modInverse(value, this->mod));
    }
};

int memo[300010];

int solve(int N, int A, int B) {
	ModInt ret(1, MOD);

	ret *= memo[N];
	ret /= memo[A];
	ret /= memo[N - A];

	ret *= memo[N];
	ret /= memo[B];
	ret /= memo[N - B];

	return ret.getValue();
}

signed main() {
	ModInt tmp(1, MOD);
	REP(i, 0, 300005) {
		memo[i] = tmp.getValue();
		tmp *= i + 1;
	}

	int N, A, B, K;
	cin >> N >> A >> B >> K;

	int ret = 0;
	REP(a, 0, N) {
		int k = K - a * A;
		if (k < 0) continue;
		if (k % B) continue;
		int b = k / B;
		if (b > N) continue;
		if (b < 0) continue;
		ret += solve(N, a, b);
		ret %= MOD;
	}

	cout << ret << endl;

    return 0;
}


Measured memory_bytes: 2560