program ABC154E
    implicit none
    integer(8)::x,y,a,b
    integer(8)::A0,keisu,i,j,U,D,ans
    read*,x,y,a,b
    A0 = fact(x+y)/(fact(x)*fact(y))
    keisu = 0
    if (a-x >= b-y) then
        do i = 0,b-y-1
            do j = 0,b-y-1
                U = fact(i+j)
                D = mod(fact(i)*fact(j),10**9+7)
                keisu = keisu + mod(2*U/D,10**9+7)
            end do
        end do
        do i = b-y, a - x - b + y + 1
            do j = 0,b-y
                U = fact(i+j)
                D = mod(fact(i)*fact(j),10**9+7)
                keisu = keisu + mod(U/D,10**9+7)
            end do
        end do
    else
        do i = 0,a-x-1
            do j = 0,a-x-1
                U = fact(i+j)
                D = mod(fact(i)*fact(j),10**9+7)
                keisu = keisu + mod(2*U/D,10**9+7)
            end do
        end do
        do i = a-x, b - y - a + x + 1
            do j = 0,a-x
                U = fact(i+j)
                D = mod(fact(i)*fact(j),10**9+7)
                keisu = keisu + mod(U/D,10**9+7)
            end do
        end do
    end if
    keisu = mod(keisu,10**9+7)
    ans = mod((A0 + 1)*keisu - 1,10**9+7)
    print*,ans
    stop
contains
integer(8) function fact(n)
    implicit none
    integer(8), intent(IN) :: n
    integer(8) :: i

    fact = 1
    do i = 1, n
      fact = mod(fact * i,10**9+7)
    end do
end function fact
end program ABC154E
