import java.io.{InputStream, OutputStream, PrintStream}
import java.util.Scanner

object Main {

  def main(args: Array[String]): Unit = {
    val solver = new Solver(System.in, System.out)
    solver.solve()
  }

  class Solver(in: InputStream, out: OutputStream) {
    lazy val input = new Scanner(in)

    lazy val output = new PrintStream(out)

    val A = 0
    val R = 1
    val G = 2
    val B = 3

    def solve(): Unit = {
      val Array(ns, as, bs, ks) = input.nextLine().split(" ")
      val n = ns.toInt
      val a = as.toLong
      val b = bs.toLong
      val k = ks.toLong

      output.println {
        val sizeList = 0.to(n).map { ai =>
          val an = a * ai
          val bn = k - an
          val bi = bn / b

          if (a * ai + b * bi == k) {
            combinationSize(n, ai) * combinationSize(n, bi.toInt)
          } else {
            BigInt(0)
          }
        }
        sizeList.sum % 998244353
      }
    }
  }

  def combinationSize(n: Int, r: Int): BigInt = {
    factorial(n) / (factorial(r) * factorial(n - r))
  }

  def factorial(n: Int): BigInt = {
    var x = BigInt(1)
    1.to(n).foreach { i =>
      x = x * i
    }
    x
  }

}
