import Control.Applicative ((<$>), (<*>))
import Control.Monad
import Data.List
import Data.Array.Unboxed

main :: IO ()
main = do
  solve <$> getl (wrds toInt) >>= print

solve :: [Int] -> Int
solve [h,w,a,b] = (foldl f ia ls) ! (w,h)
  where
    ia = listArray ((1,1),(w,h)) (repeat 0) :: UArray (Int,Int) Int
    ls = [(x,y)| y <- [1..h], x <- [1..w]]
    f :: UArray (Int,Int) Int -> (Int,Int) -> UArray (Int,Int) Int
    f ar (x,y)
      | x <= b && y > h - a = ar
      | x == 1 || y == 1 = ar // [((x,y),1)]
      | otherwise = ar // [((x,y), (ar ! (x-1,y) + ar ! (x, y-1)) `mod` md)]
        
toInt :: String -> Int
toInt = read

wrds :: (String -> a) -> String -> [a]
wrds f = map f . words

getl :: (String -> a) -> IO a
getl f = f <$> getLine

md :: Int
md = 10 ^ 9 + 7
