import Control.Monad (forM)

denom = 998244353

main :: IO ()
main = do
  [n,a,b,k] <- map read.words <$> getLine :: IO [Int]
  let pascalTriangle = [1]:map (\xs -> zipWith (+) (0:xs) (xs ++ [0])) pascalTriangle
      c = a+b
      aMax = min (k`div`a) n
      bMax = min (k`div`b) n
      cands = [ (x,y,z) | x<-[0..aMax], y<-[0..bMax], x*a+y*b <= k, let (z,m) =(k-x*a-y*b)`divMod`c, m==0 ]
  anss <- forM cands $ \(x,y,z) -> do
        let rPatterns = (pascalTriangle !! n !! x) `mod` denom
            bPatterns = (pascalTriangle !! (n-x) !! y) `mod` denom
            gPatterns = (pascalTriangle !! (n-x-y) !! z) `mod` denom
        return ((rPatterns*bPatterns*gPatterns)`mod`denom)
  print $ sum anss `mod` denom
