
main = do
    [n,a,b,k] <- (map read) <$> words <$> getLine
    --let bot = min a b
    --let ini = div k (a+b)
    let ini = filter (check a b k) $ dist4 n n
    let ans = map (rchoose 4) ini 
    putStrLn $ show $ sum ans `mod` 998244353


check :: Int -> Int -> Int -> [Int] -> Bool
check a b k [_,x,y,z]= x*a+y*(a+b)+z*b==k
check _ _ _ _ = False

rchoose :: Int -> [Int] -> Int
rchoose _ [] = 1
rchoose n ls = (choose n (head ls)) * (rchoose (n-head ls) (tail ls))

choose :: Int -> Int -> Int
choose n k = aux k 1 n k
    where
        aux :: Int -> Double -> Int -> Int -> Int
        aux 0 ac _ _ = round ac
        aux i ac n k = aux (i-1) (ac* fromIntegral (n-(k-i))/fromIntegral i) n k


dist4 :: Int -> Int -> [[Int]]
dist4 n 0  = map (0:) (dist3 n n)
dist4 n fs = map (fs:) (dist3 (n-fs) (n-fs))++(dist4 n (fs-1))

dist3 :: Int -> Int -> [[Int]]
dist3 n 0  = map (0:) (dist2 n n)
dist3 n fs = map (fs:) (dist2 (n-fs) (n-fs))++(dist3 n (fs-1))

dist2 :: Int -> Int -> [[Int]]
dist2 n 0 = [[0,n]]
dist2 n sn = [[sn,n-sn]]++(dist2 n (sn-1))