let rec power ( * ) one m = function
  | 0 -> one
  | n when n mod 2 = 0 ->
      power ( * ) one (m * m) (n / 2)
  | n ->
      m * power ( * ) one m (n - 1)

let p = 998244353
let ( *^ ) x y = (x * y) mod p
let ( +^ ) x y = (x + y) mod p

let () = Scanf.scanf "%d %d %d %d" @@ fun n a b k ->
  let comb =
    let fact = Array.make (n + 1) 1 in
    for i = 2 to n do
      fact.(i) <- i *^ fact.(i - 1)
    done;
    let inv_fact = Array.map (fun i -> power ( *^ ) 1 i (p - 2)) fact in
    fun n r -> fact.(n) *^ inv_fact.(r) *^ inv_fact.(n - r) in
  Array.init (n + 1) (fun i ->
    let j = (k - a * i) / b in
    if a * i + b * j = k && 0 <= j && j <= n then [(i, j)]
    else [])
  |> Array.fold_left (fun xs ys -> ys @ xs) []
  (* Ai + Bj = K *)
  |> List.rev_map (fun (i, j) -> comb n i *^ comb n j)
  |> List.fold_left ( +^ ) 0
  |> Printf.printf "%d\n"