{-# LANGUAGE FlexibleContexts      #-}
{-# LANGUAGE MultiParamTypeClasses #-}

import qualified Data.Array.IArray   as I
import qualified Data.Array.MArray   as M

import           Data.Array.IO       (IOArray)
import           Data.Array.ST       (STArray)

import qualified Data.List           as L

import           Control.Applicative
import           Control.Monad
import           Control.Monad.ST    (ST, runST)

main :: IO ()
main = do
  [h, w, a, b] <- getSeq
  print $ solve h w a b

getSeq  = map read . words <$> getLine   :: Read a => IO [a]

mymod = let modval = 10 ^ 9 + 7 in (`mod` modval) :: Int -> Int

solve :: Int -> Int -> Int -> Int -> Int
solve h w a b = runST $ do
  let accum :: M.MArray a Int m => a Int Int -> Int -> m ()
      accum dp x = do
        left <- M.readArray dp (x-1)
        M.readArray dp x >>= M.writeArray dp x . mymod . (left +)
  dp <- M.newArray (1, w) 1 :: ST s (STArray s Int Int)
  replicateM_ (h-a-1) $
    forM_ [2..w] (accum dp)
  M.writeArray dp b 0
  replicateM_ a $
    forM_ [b+1..w] (accum dp)
  M.readArray dp w
