#include<cstdio>
#include<cstring>
using namespace std;
const int maxn=500005,MOD=1e9+7;
typedef long long LL;
LL ans,fac[maxn],inv[maxn],fac_inv[maxn];
LL C(int n,int m){ return fac[n]*fac_inv[m]%MOD*fac_inv[n-m]%MOD; }
int main(){
fac[0]=1; for(int i=1;i<=500000;i++) fac[i]=fac[i-1]*i%MOD;
inv[1]=1; for(int i=2;i<=500000;i++) inv[i]=(LL)(MOD-MOD/i)*inv[MOD%i]%MOD;
fac_inv[0]=1; for(int i=1;i<=500000;i++) fac_inv[i]=fac_inv[i-1]*inv[i]%MOD;
int x,_x,y,_y; scanf("%d%d%d%d",&x,&_x,&y,&_y);
ans=(C(x+y,x)*C(_x+_y,_x)%MOD-C(x+_y,x)*C(_x+y,_x)%MOD)%MOD;
printf("%d\n",(ans+MOD)%MOD);
return 0;
}