#pragma GCC optimize("Ofast")
#include<bits/stdc++.h>
using namespace::std;
//struct __INIT{__INIT(){cin.tie(0);ios::sync_with_stdio(false);cout<<fixed<<setprecision(15);}} __init;
__attribute__((constructor))
void init(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	cout<<fixed<<setprecision(15);
}
// random_device rd;
// mt19937 mt(rd());
// #include <boost/numeric/interval.hpp>
// #include <boost/numeric/interval/io.hpp>
// #include <boost/intrusive/rbtree.hpp>
// #include <boost/dynamic_bitset.hpp>
// #include <boost/geometry.hpp>
// #include <boost/geometry/geometries/linestring.hpp>
// #include <boost/geometry/geometries/polygon.hpp>
// #include <boost/geometry/geometries/point_xy.hpp>
// #include <boost/math/tools/minima.hpp>
// using boost::math::tools::brent_find_minima;
// #include <boost/multiprecision/cpp_dec_float.hpp>
// #include <boost/multiprecision/cpp_int.hpp>
// namespace mp = boost::multiprecision;
// typedef mp::number<mp::cpp_dec_float<256>> cdouble;
// typedef mp::cpp_int cint;

#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
//#include <ext/pb_ds/priority_queue.hpp>
#include<ext/pb_ds/tag_and_trait.hpp>
using namespace __gnu_pbds;
template<typename T=long long>using pbds=tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
template<typename T=long long>using pbds_map=tree<T,T,less<T>,rb_tree_tag,tree_order_statistics_node_update>;
//template<typename T=long long>using pqueue =__gnu_pbds::priority_queue<T, less<T>,rc_binomial_heap_tag>;
typedef long long lint;
typedef long long ll;
typedef long double ldouble;
typedef vector<lint> vec;
typedef vector<vector<lint>> mat;
typedef vector<vector<vector<lint>>> mat3;
typedef vector<double> dvec;
typedef vector<vector<double>> dmat;
typedef vector<vector<vector<double>>> dmat3;
typedef vector<string> svec;
typedef vector<vector<string>> smat;
typedef vector<vector<vector<string>>> smat3;
typedef vector<pair<lint,lint>> pvec;
typedef vector<vector<pair<lint,lint>>> pmat;
typedef vector<vector<vector<pair<lint,lint>>>> pmat3;
#define rep(i, n) for(lint i = 0; i < (lint)(n); i++)
#define irep(i) for(lint i = 0;; i++)
#define irep1(i) for(lint i = 1;; i++)
#define irep2(i) for(lint i = 2;; i++)
#define rrep(i, n) for(lint i = (lint)(n-1); i >-1; i--)
#define rrepi(i,a,b) for(lint i = (lint)(b-1); i >a-1; i--)
#define repi(i,a,b) for(lint i=lint(a);i<lint(b);i++)
#define rep2(i,a,b,c) for(lint i=lint(a);i>lint(b);i+=c)
#define all(x) (x).begin(),(x).end()
#define PI 3.141592653589793
#define dist(x1,y1,x2,y2) (pow(pow(x2-x1,2)+pow(y2-y1,2),0.5))
#define output(v) do{bool f=0;for(auto i:v){cout<<(f?" ":"");if(i>INF/2)cout<<"INF";else cout<<i;f=1;}cout<<"\n";}while(0);
#define output2(v) for(auto j:v)output(j);
#define _output(v) do{bool f=0;rep(i,v.size()){cout<<(f?" ":"");if(v[i]>INF/2)cout<<"INF";else cout<<v[i];f=1;}cout<<"\n";}while(0)
#define _output2(v) rep(j,v.size()){_output(v[j]);}
#define input(a,n) lint n;cin>>n;vector<lint>a(n);rep(i,n)cin>>a[i];
#define SUM(v) accumulate(all(v),0LL)
#define INF (1LL<<60)
#define IINF (1<<30)
#define EPS (1e-10)
#define LINF 9223372036854775807
//#define MOD 998244353LL
#define MOD 1000000007LL
#define endl "\n"
template<typename T=lint>T in(){return *istream_iterator<T>(cin);}
inline lint gcd(lint a,lint b){return b?gcd(b,a%b):a;}
template<typename T=lint>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
template<typename T=lint>inline T add(T a,T b){return a+b;}
template<typename T=lint>inline T minq(T a,T b){return min(a,b);}
inline bool chmin(auto& s,const auto& t){bool res=s>t;s=min(s,t);return res;}
inline bool chmax(auto& s,const auto& t){bool res=s<t;s=max(s,t);return res;}
vector<lint> dx={-1,1,0,0,1,1,-1,-1};
vector<lint> dy={0,0,-1,1,1,-1,1,-1};

class Comb{
    public:
    vector<lint> fac,ifac;
    Comb(){
        fac.resize(300001);
        ifac.resize(300001);
        fac[0] = 1;
        ifac[0] = 1;
        rep(i,300000){
            fac[i+1] = fac[i]*(i+1) % MOD;
            ifac[i+1] = ifac[i]*mpow(i+1, MOD-2) % MOD;
        }
    }
    lint mpow(lint x, lint n){
        lint ans = 1;
        while(n != 0){
            if(n&1) ans = ans*x % MOD;
            x = x*x % MOD;
            n = n >> 1;
        }
        return ans;
    }
    lint comb(lint a, lint b){
        if(a == 0 && b == 0)return 1;
        if(a < b || a < 0)return 0;
        lint tmp = ifac[a-b]* ifac[b] % MOD;
        return tmp * fac[a] % MOD;
    }
};
class mint {
  using u64 = std::uint_fast64_t;
    public:
    u64 a;
    constexpr mint(const u64 x = 0) noexcept : a(x % MOD) {}
    constexpr u64 &value() noexcept { return a; }
    constexpr const u64 &value() const noexcept { return a; }
    constexpr mint operator+(const mint rhs) const noexcept {
        return mint(*this) += rhs;
    }
    constexpr mint operator-(const mint rhs) const noexcept {
        return mint(*this) -= rhs;
    }
    constexpr mint operator*(const mint rhs) const noexcept {
        return mint(*this) *= rhs;
    }
    constexpr mint operator/(const mint rhs) const noexcept {
        return mint(*this) /= rhs;
    }
    constexpr mint &operator+=(const mint rhs) noexcept {
        a += rhs.a;
        if (a >= MOD) {
            a -= MOD;
        }
        return *this;
    }
    constexpr mint &operator-=(const mint rhs) noexcept {
        if (a < rhs.a) {
            a += MOD;
        }
        a -= rhs.a;
        return *this;
    }
    constexpr mint &operator*=(const mint rhs) noexcept {
        a = a * rhs.a % MOD;
        return *this;
    }
    constexpr mint operator++(int n) const noexcept {
        return mint(*this) +=1;
    }
    constexpr mint operator--(int n) const noexcept {
        return mint(*this) -=1;
    }
    constexpr mint &operator/=(mint rhs) noexcept {
        u64 exp = MOD - 2;
        while (exp) {
            if (exp % 2) {
                *this *= rhs;
            }
            rhs *= rhs;
            exp /= 2;
        }
        return *this;
    }
};
ostream& operator<<(ostream& lhs, const mint& rhs) noexcept {
    lhs << rhs.a;
    return lhs;
}
istream& operator>>(istream& lhs, const mint& rhs) noexcept {
    lhs >> rhs.a;
    return lhs;
}
inline mint pow(mint m,lint n){
    if(n==0)return 1;
    else if(n%2==0){
        mint x=pow(m,n/2);
        return x*x;
    }else{
        return m*pow(m,n-1);
    }
}
inline mint fact(lint a){
    return a?fact(a-1)*a:1;
}
int main(){
    lint a,b,c,d;
    cin>>a>>b>>c>>d;
    Comb comb;
    mint ans=0;
    rep(i,min(a-c,b-d)){
        ans+=mint(comb.comb(a+d-c-1,d+i))*comb.comb(b+c-d-1,c+i);
    }
    cout<<ans<<endl;
}

// template<typename T,typename E>
// struct segment{
//     private:
//     struct node{
//         T val;
//         E lazy;
//         node* ch[2]={nullptr,nullptr};
//         node(segment* seg):val(seg->et),lazy(seg->ee){}
// 		node(T val,E lazy,node** ch):val(val),lazy(lazy),ch(ch){}
//     };
//     using np=node*;
// 	using lint=long long;
//     np root=new node(this);
//     T et;
//     E ee;
//     lint n=1;
// 	vector<np>hist{root};
//     public:
//     segment(lint size,T et=0,E ee=0):et(et),ee(ee){
//         while(n<size)n<<=1;
//     }
//     np update(lint a,lint b,E val){
// 		root=copy(root);
// 		hist.push_back(root);
//         update(a,b,val,0,0,n,root);
		
//     }
//     T get(lint a,lint b){
//         return get(a,b,0,0,n,root);
//     }
// 	T get(lint a,lint b,int ver){
//         return get(a,b,0,0,n,hist[ver]);
//     }
//     private:
// 	np copy(np t){
// 		return new node(t->val,t->val,t->ch);
// 	}
//     //0-indexed [a,b)
//     T update(lint a,lint b,lint val,lint k,lint l,lint r,np t){
//         eval(t,k);
//         //区間外
//         if(r<=a||b<=l)return t->val;
//         //全部区間内
//         if(a<=l&&r<=b){
//             t->lazy=g(t->lazy,val);
//             return h(t->val,t->lazy);
//         }
//         //一部区間内
//         rep(i,2)if(!t->ch[i])t->ch[i]=new node(this);
//         T res=et;
//         res=f(res,update(a,b,val,2*k+1,l,(l+r)/2,copy(t->ch[0])));
//         res=f(res,update(a,b,val,2*k+2,(l+r)/2,r,copy(t->ch[1])));
//         return t->val=res;
//     }
//     //0-indexed [a,b)
//     T get(lint a,lint b,lint k,lint l,lint r,np t){
//         eval(t,k);
//         //区間外
//         if(r<=a||b<=l)return et;
//         //全部区間内
//         if(a<=l&&r<=b)return t->val;
//         //一部区間内
//         rep(i,2)if(!t->ch[i])t->ch[i]=new node(this);
//         T res=et;
//         res=f(res,get(a,b,2*k+1,l,(l+r)/2,t->ch[0]));
//         res=f(res,get(a,b,2*k+2,(l+r)/2,r,t->ch[1]));
//         return res;
//     }
//     inline void eval(np t,int64_t k){
//         if(t->lazy==ee)return;
//         if((k*4+1)*3<n*4-1){
//             rep(i,4)if(!t->ch[i])t->ch[i]=new node(this);
//             rep(i,4)t->ch[i]->lazy=g(t->ch[i]->lazy,t->lazy);
//         }
//         t->val=h(t->val,t->lazy);
//         t->lazy=ee;
//     }
//     T f(T a,T b){
//         return a+b;
//     }
//     T h(T a,E b){
//         return a+b;
//     }
//     E g(E a,E b){
//         return a+b;
//     }
//     auto update(auto a,auto b){return b==ee?a:b;}
// };

// int main(){
// 	lint n,q;
// 	cin>>n>>q;
// 	vec x(n),y(n),w(n),a(q),b(q),c(q),d(q),s,t;
// 	rep(i,n)cin>>x[i]>>y[i]>>w[i];
// 	rep(i,q)cin>>a[i]>>b[i]>>c[i]>>d[i];
// 	s=x;t=y;
// 	s.insert(s.end(),all(a));
// 	t.insert(t.end(),all(b));
// 	s.insert(s.end(),all(c));
// 	t.insert(t.end(),all(d));
// 	sort(all(s));sort(all(t));
// 	s.erase(unique(all(s)),s.end());
// 	t.erase(unique(all(t)),t.end());
// 	rep(i,n)x[i]=lower_bound(all(s),x[i])-s.begin();
// 	rep(i,n)y[i]=lower_bound(all(t),y[i])-t.begin();
// 	rep(i,q)a[i]=lower_bound(all(s),a[i])-s.begin();
// 	rep(i,q)b[i]=lower_bound(all(t),b[i])-t.begin();
// 	rep(i,q)c[i]=lower_bound(all(s),c[i])-s.begin();
// 	rep(i,q)d[i]=lower_bound(all(t),d[i])-t.begin();
// 	vector<tuple<lint,lint,lint>>v(n);
// 	rep(i,n)v[i]=x[i]
// }

Measured memory_bytes: 4992