const val P = 998244353L

// Find (x, y, r) such that r = gcd(a,b) and ax + by = r.
fun extendedGCD(a: Long, b: Long): Triple<Long, Long, Long> {
  var x0 = 1L
  var y0 = 0L
  var z0 = a
  var x1 = 0L
  var y1 = 1L
  var z1 = b
  while (true) {
    if (z1 == 0L) return Triple(x0, y0, z0)
    val q = z0 / z1
    val x2 = x0 - q * x1
    val y2 = y0 - q * y1
    val z2 = z0 - q * z1
    x0 = x1
    x1 = x2
    y0 = y1
    y1 = y2
    z0 = z1
    z1 = z2
  }
}

fun inverseMod(a: Long, m: Long): Long {
  val (x, y, r) = extendedGCD(a, m)
  if (r != 1L) return 0  // No inverse.

  return (x + m) % m
}

fun timesMod(x: Long, y: Long): Long {
  return x * y % P
}

fun plusMod(x: Long, y: Long): Long {
  return (x + y) % P
}

fun minusMod(x: Long, y: Long): Long {
  return (x - y + P) % P
}

fun divMod(x: Long, y: Long): Long {
  return timesMod(x, inverseMod(y, P))
}

fun main(args: Array<String>) {
  val (n, a, b, k) = readLine()!!.split(" ").map { it.toLong() }
  val nInt = n.toInt()

  val factorialTable = LongArray(nInt + 1)
  factorialTable[0] = 1
  for (i in 1..nInt) {
    factorialTable[i] = timesMod(factorialTable[i - 1], i.toLong())
  }

  var ans = 0L
  for (x in 0..nInt) {
    if (a * x > k) continue
    // k - a * x >= 0.
    if ((k - a * x) % b != 0L) continue
    val yLong = (k - a * x) / b
    if (yLong > n) continue
    val y = yLong.toInt()
    val fx = divMod(divMod(factorialTable[nInt], factorialTable[x]), factorialTable[nInt - x])
    val fy = divMod(divMod(factorialTable[nInt], factorialTable[y]), factorialTable[nInt - y])
//    println("$n $x $y")
//    println("$fx $fy")
    ans = plusMod(ans, timesMod(fx, fy))
  }
  println(ans)
}
