import Control.Applicative
import Data.List

cm = 998244353

mp x y = mod ((mod x cm) * (mod y cm)) cm
mf 0 = 1
mf n = mp n (mf (n-1))
mg n m = foldl mp 1 [n..n-m]

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

euc :: Integer -> Integer -> (Integer,Integer,Integer)
euc a b = ef 1 a 0 b a b

ef x g v w a b | w==0 = (g, x, div (g - a*x) b)
               | otherwise = ef v w s t a b
               where (q,t) = divMod g w
                     s = x - q*v

solve :: Integer->Integer->Integer->Integer->Integer
solve n a b k | k /= 0 =  sum $ map (calc n) (f2 n a b k)
              | otherwise = 0

comb :: (Integer,Integer) -> Integer
comb (n,m) = div (g n m) (factorial m)
g n m = foldl (*) 1 [n,n-1..(n-m+1)]
factorial 0 = 1
factorial n = n * factorial (n-1)
cb :: (Integer,Integer) -> Integer
cb (n,m) | n>=m = mod (comb (n,m)) cm
         | otherwise = mod (comb (m,n)) cm
calc n (x,y) = mp (cb (n,x)) (cb (n,y))

                    
f2 n a b k | x > y = takeWhile c2 . dropWhile nc2 . takeWhile c1 $ dropWhile nc1 list1
           | otherwise = takeWhile c1 . dropWhile nc1 . takeWhile c2 $ dropWhile nc2 list2
           where (g,x,y) = euc a b
                 (q,r) = divMod k g
                 w1 = div b g 
                 w2 = div a g
                 xq = x*q
                 yq = y*q
                 list1 = zip [xq, (xq-w1)..] [yq, (yq+w2)..]
                 list2 = zip [xq, (xq+w1)..] [yq, (yq-w2)..]
                 c1 (x,_) = x <= n && x >= 0
                 nc1 (x,_) = x > n
                 c2 (_,y) =  y <= n && y >= 0
                 nc2 (_,y) = y > n