#include <cstdio>
#include <vector>
using namespace std;
using ll = long long int;
const ll MOD = 1000000007;

ll mod_pow(ll x, ll n) {
    if(n == 0) return 1;
    ll res = mod_pow((x * x) % MOD, n / 2);
    if(n & 1) res = (res * x) % MOD;
    return res;
}

// 階乗 mod p
vector<ll> fact;
void fact_mod(int n) {
    fact.resize(n+1);
    fact[0] = 1;
    for(int i=0; i<n; i++) {
        fact[i+1] = (fact[i] * (i+1)) % MOD;
    }
}

// 階乗の逆元 mod p
vector<ll> finv;
void fact_inv(int n) {
    finv.resize(n+1);
    finv[n] = mod_pow(fact[n], MOD-2);
    for(int i=n-1; i>=0; i--) {
        finv[i] = (finv[i+1] * (i+1)) % MOD;
    }
}

// fact, finv を使って組み合わせを出す
// 基本的にはこれを使ったほうがいい
ll combination_array(int n, int r) {
    if(n < 0 || r < 0 || n < r) return 0;
    ll x = fact[n];
    ll y = (finv[r] * finv[n-r]) % MOD;

    return (x * y) % MOD;
}

ll combination_duplicate(int x, int y) {
    return combination_array(x+y-1, y);
}

const int M = 6000010;
int main() {
    fact_mod(M);
    fact_inv(M);

    while(1) {
        ll A, B, C, X, Y; scanf("%lld%lld%lld%lld%lld", &A, &B, &C, &X, &Y);
        if(A + B + C + X + Y == 0) break;

        ll ans = 0;
        // diff を決め打ち
        for(int D = 0; D <= X+Y; D++) {
            int free_pt = (X+Y-D) / 2, S = A+B+C;
            if( (X+Y-D) % 2 == 1 ) continue;
            if(free_pt > X || free_pt > Y) continue;

            // 差分以外の点数を適当に配置
            ll add = combination_duplicate(S, free_pt);

            // 引き分けの位置
            (add *= combination_array(S, C)) %= MOD;

            // 勝ちの位置
            (add *= combination_array(A+B, A)) %= MOD;

            // P, Q の計算 (それぞれ A 以上・B 以上でなければならない)
            int P = X - free_pt, Q = Y - free_pt;

            if(P < A || Q < B) continue;
            if(A == 0 && P > 0) continue;
            if(B == 0 && Q > 0) continue;
            P -= A, Q -= B;
            if(A > 0) (add *= combination_duplicate(A, P)) %= MOD;
            if(B > 0) (add *= combination_duplicate(B, Q)) %= MOD;

            (ans += add) %= MOD;
            // printf("D = %d, add = %lld\n", D, add);
        }
        printf("%lld\n", ans);
    }
    return 0;
}
