#include<bits/stdc++.h>
using namespace std;
const int M = 1000000007;

long long perm[3100000], inv[3100000];
long long powmod(long long a, long long b) {
    if (a >= M) return powmod(a % M, b);
    if (b == 0) return 1;
    if (b & 1) return powmod(a, b - 1) * a % M;
    else return powmod(a * a % M, b / 2);
}
long long comb(long long n, long long k) {
    if (n == k) return 1;
    if (k < 0 || n < k) return 0;
    return perm[n] * inv[k] % M * inv[n - k] % M;
}

int main() {
    perm[0] = 1;
    inv[0] = 1;
    for (int i = 1; i < 3100000; ++i) {
        perm[i] = perm[i - 1] * i % M;
        inv[i] = powmod(perm[i], M - 2);
    }
    while (1) {
        int a, b, c, sx, sy;
        cin >> a >> b >> c >> sx >> sy;
        if (a + b + c == 0) return 0;

        long long ans = 0;
        for (int i = max(a, sx - sy + b); i <= sx; ++i) {
            int j = i - sx + sy;
            int k = sx - i;
            ans = (ans + comb(i - 1, a - 1) * comb(j - 1, b - 1) % M * comb(a + b + c, a) % M * comb(b + c, b) % M * comb(a + b + c + k - 1, k) % M) % M;
        }
        cout << ans << "\n";
    }
}