local mod = 998244353
local mfl = math.floor
local function bmul(x, y)
  local x0, y0 = x % 31596, y % 31596
  local x1, y1 = mfl(x / 31596), mfl(y / 31596)
  return (x1 * y1 * 62863 + (x1 * y0 + x0 * y1) * 31596 + x0 * y0) % mod
end

local function badd(x, y)
  return (x + y) % mod
end

local function modpow(src, pow)
  local res = 1
  while 0 < pow do
    if pow % 2 == 1 then
      res = bmul(res, src)
      pow = pow - 1
    end
    src = bmul(src, src)
    pow = mfl(pow / 2)
  end
  return res
end

local function modinv(src)
  return modpow(src, mod - 2)
end

local n, a, b, k = io.read("*n", "*n", "*n", "*n")
local combs = {1}
for i = 1, n do
  local v = combs[i]
  v = bmul(v, n + 1 - i)
  v = bmul(v, modinv(i))
  combs[i + 1] = v
end

local ret = 0
for ib = 0, n do
  local rem = k - ib * b
  if rem < 0 then break end
  if rem % a == 0 then
    local ia = mfl(rem / a)
    if ia <= n then
      ret = badd(ret, bmul(combs[ib + 1], combs[ia + 1]))
    end
  end
end
print(ret)
