
import Data.List
import Control.Applicative
import qualified Control.Monad.State as ST
import qualified Data.Map as M
type Ma = M.Map (Int,Int) Integer
type St = ST.State Ma Integer
  
main = do
  p <- getContents
  let fstline = words $ head $ lines p 
      h = read $ fstline !! 0 ::Integer
      w = read $ fstline !! 1 :: Integer
      a = read $ fstline !! 2 :: Integer
      b = read $ fstline !! 3 ::Integer
      m = M.empty :: Ma  
  putStr $  show $ getNum' h w a b !! ( getTtoN ( w - 1, h - 1) h ) -- ToDo
  

getNum' :: Integer-> Integer-> Integer -> Integer -> [Integer]
getNum' h w a b = target 
  where target = [ getListElement n | n <- [0..] ] 
          where getListElement n | y > ( ( h - 1 ) - a) && x <= ( b - 1)  = 0
                                 | x == 0 = y
                                 | y == 0 = x   
                                 | otherwise = ( target !! ( getTtoN (x - 1 ,y) h ) + target !! ( getTtoN (x, y -1) h ) ) `mod` ( 10 ^ 9 + 7 )
                                   where (x, y) = getNtoT h n 
  
getX :: Integer -> Integer-> Integer
getX h n  = n `div` h
getY :: Integer -> Integer -> Integer
getY h n = n `mod` h
getNtoT :: Integer -> Integer -> (Integer, Integer)
getNtoT h n = (getX h n , getY h n)
getTtoN :: (Integer, Integer) -> Integer -> Int
getTtoN (x,y) h = fromIntegral (x * h + y)
  
getNum :: Ma  -> (Int, Int) -> Integer
getNum m (1,1) = 0
getNum m (1,2) = 1        
getNum m (2,1) = 1
getNum m (x,y) | re  == Nothing =  lef + abo
               | otherwise =  (\(Just x) -> x) re 
  where re = M.lookup (x,y) m
        lef =   getNum m ( (x - 1) , y ) 
        abo =   getNum m ( x, (y - 1) )

memorize :: Ma -> (Int, Int) -> Ma
memorize m (x,y) | M.lookup (x,y) m == Nothing = M.insert (x, y) re m
                 | otherwise = m
  where re = getNum m (x,y)

runMemo :: Ma -> (Int,Int) -> Ma      
runMemo m  (x, y)  = m   --f (m , (x,y))                     
  where xs = [1..x]
        ys = [1..y]
        
--initiarize :: Ma -> Int -> Int -> Int -> Int -> Ma
--initiarize m h w a b = map ( M.insert undefined




