program many_paths
    implicit none
    integer(8) r1, r2, c1, c2, i, j, k
    integer(8) :: ans1 = 1, ans2 = 1, ans3 = 1, ans4 = 1, ans = 0
    read *, r1, c1, r2, c2
    do i = 1, r1+c1
        ans1 = ans1 * i
        do j = i, i
            if(j .le. r1)then
                ans1 = ans1 / j
            else if(j .gt. r1)then
                do k = 1, c1
                    ans1 = ans1 / k
                    if(k .eq. c1)exit
                end do
            end if
            if(j .eq. r1+c1)exit
        end do
        if(i .eq. r1+c1)exit
    end do
    do i = 1, r1+c2
        ans2 = ans2 * i
        do j = i, i
            if(j .le. r1)then
                ans2 = ans2 / j
            else if(j .gt. r1)then
                do k = 1, c2
                    ans2 = ans2 / k
                    if(k .eq. c2)exit
                end do
            end if
            if(j .eq. r1+c2)exit
        end do
        if(i .eq. r1+c2)exit
    end do
    do i = 1, r2+c1
        ans3 = ans3 * i
        do j = i, i
            if(j .le. r2)then
                ans3 = ans3 / j
            else if(j .gt. r2)then
                do k = 1, c1
                    ans3 = ans3 / k
                    if(k .eq. c1)exit
                end do
            end if
            if(j .eq. r2+c1)exit
        end do
        if(i .eq. r2+c1)exit
    end do
    do i = 1, r2+c2
        ans4 = ans4 * i
        do j = i, i
            if(j .le. r2)then
                ans4 = ans4 / j
            else if(j .gt. r2)then
                do k = 1, c2
                    ans4 = ans4 / k
                    if(k .eq. c2)exit
                end do
            end if
            if(j .eq. r2+c2)exit
        end do
        if(i .eq. r2+c2)exit
    end do
    ans = mod(ans1+ans2+ans3+ans4, 10**9+7)
    print *, ans
end program