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 memoize n f =
  let dp = Hashtbl.create n in
  let rec get x =
    try Hashtbl.find dp x with
    | Not_found ->
        let result = f get x in
        Hashtbl.add dp x result;
        result in
  get

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

let comb = memoize 10000000 @@ fun comb -> function
  | (_, 0) -> 1
  | (n, r) -> n *^ power ( *^ ) 1 r (p - 2) *^ comb (n - 1, r - 1)
let comb n r =
  if r <= n / 2
  then comb (n, r)
  else comb (n, n - r)

let () = Scanf.scanf "%d %d %d %d" @@ fun n a b k ->
  Array.init (n + 1) (fun i ->
    let j = (k - a * i) / b in
    if a * i + b * j = k && 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"