import Control.Applicative
import Data.Array

main = do
    [n,a,b,k] <- map read . words <$> getLine
    print $ solve n a b k

solve :: Integer -> Integer -> Integer -> Integer -> Integer
solve n a b k = sum . map calcPattern $ getSolutions n a b k 
      where calcPattern (x,y) = mComb n x `mp` mComb n y
            (_,_,mComb) = prevCalc n

{-mod combination-}
p = 998244353
prevCalc :: Integer -> (Array Integer Integer, Array Integer Integer, Integer -> Integer -> Integer)
prevCalc n = (facts,invs,mComb)
      where facts = mfactArray n 
            invs = listArray (0,n) . reverse . take (fromIntegral (n+1)) $ mInvs n invn
            invn = mpw (facts ! n) (p-2)
            mComb = comb facts invs
comb facts invs n m = mp (mp (facts ! n) (invs ! m)) (invs ! (n-m))

mp x y = mod (x*y) p
mfactorials = 1 : zipWith mp mfactorials [1..]
mpw x n | n == 0 = 1
        | otherwise = if mod n 2 == 1 
                      then x * mpw (mp x x) (div n 2) `mod` p
                      else mpw (mp x x) (div n 2) `mod` p

mfactArray n = listArray (0,n) $ take (fromIntegral (n+1)) mfactorials
mInvs n init = init : zipWith mp (mInvs n init) [n,n-1..]

{- Ax + By = K -}
getSolutionY n a b k x | mod m b /= 0 = Nothing
                       | otherwise = if q >= 0 && q <= n then Just (x,q) else Nothing
                        where m = k - a*x
                              q = div m b

getSolutions n a b k = foldl f [] $ map g [0..n]
            where g = getSolutionY n a b k
                  f list x = case x of Just value -> value:list
                                       Nothing -> list