#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define MX 5000000
ll fact[MX+8];
ll rfact[MX+8];
ll i,j,k,l,a,b;
ll mod = 1000000007ll;

ll rui(ll a,ll b){
	if(b == 0){
		return 1;
	}else if(b == 1){
		return a;
	}else{
		if(b % 2 == 1){
			ll ans = a * rui(a,b-1);
			ans %= mod;
			return ans;
		}else{
			ll ans = rui(a,b/2);
			ans *= ans;
			ans %= mod;
			return ans;
		}
	}
}


void c3_init(){
	fact[0] = 1;
	for(int i=1;i<=MX;i++){
		fact[i] = fact[i-1] * i;
		fact[i] %= mod;
	}
	rfact[MX] = rui(fact[MX],mod-2);
	for(i=MX-1;i>=0;i--){
		rfact[i] = rfact[i+1] * (i+1);
		rfact[i] %= mod;
	}
}



ll suma[MX+100],sumb[MX+100];

ll c3(ll n,ll r){
	//nCrwomotomeru
	if(n == 0){
		return 1;
	}
	if(r > n || n < 0 || r < 0){
		if(r > n)cout << "r > n" << endl;
		if(n < 0)cout << "n < 0" << endl;
		if(r < 0)cout << "r < 0" << endl;
		//cout << " !!! " << endl;
	}
	if(r == 0){
		return 1;
	}
	return (((fact[n] * rfact[r]) % mod) * rfact[n-r]) % mod;
}

bool solve(){
	ll a,b,c,sx,sy;
	cin >> a >> b >> c >> sx >> sy;
	if(a + b + c == 0)return false;
	if(sx < sy){
		swap(a,b);
		swap(sx,sy);
	}
	//sx > sy 
	for(int i=0;i<=sx;i++){
		if(a == 0){
			if(i == 0){
				suma[i] = 1;
			}else{
				suma[i] = 0;
			}
		}else{
			if(i == 0){
				suma[i] = 0;
			}else{
				if(i < a){
					suma[i] = 0;
				}else{
					suma[i] = c3(i-1,a-1);
				}
			}
		}
	}
	for(int i=0;i<=sy;i++){
		if(b == 0){
			if(i == 0){
				sumb[i] = 1;
			}else{
				sumb[i] = 0;
			}
		}else{
			if(i == 0){
				sumb[i] = 0;
			}else{
				if(i < b){
					sumb[i] = 0;
				}else{
					sumb[i] = c3(i-1,b-1);
				}				
			}
		}
	}
	ll ans = 1;
	ll sum = 0;
	for(int i=0;i<=sy;i++){
		//cout << suma[i + sx - sy] * sumb[i] << endl;
		sum += (((suma[i + sx - sy] * sumb[i]) % mod) * c3(a+b+c-1+sy - i,sy - i) % mod);
		sum %= mod;
	}
	//cout << suma[29] << " " << sumb[0] << endl;
	ans = c3(a+b+c,a) * c3(b+c,b);
	ans %= mod;
	ans *= sum;
	ans %= mod;
	//ans *= c3(a+b+c-1+sy,sy);
	ans %= mod;
	cout << ans << endl;
	return true;
}

int main(){
	
	c3_init();
	while(solve()){}
	
}

