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 fact n = Array.fold_left ( *^ ) 1 @@ Array.init n (( + ) 1)
let perm n r = Array.fold_left ( *^ ) 1 @@ Array.init r (( + ) (n - r + 1))
let comb n r = perm n r *^ power ( *^ ) 1 (fact r) (p - 2)

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.to_list
  |> List.concat (* Ai + Bj = K の解 (i, j) のリスト *)
  |> List.map (fun (i, j) -> comb n i *^ comb n j)
  |> List.fold_left ( +^ ) 0
  |> Printf.printf "%d\n"