#include <cassert>
#include <iomanip>
#include <iostream>
using namespace std;
template<int mod>
class Modulo {
public:
constexpr Modulo(): num(0) {}
constexpr Modulo(int n): num(n % mod) {}
constexpr Modulo(Modulo const &) = default;
constexpr int data() const { return num; }
constexpr Modulo &operator+=(Modulo other) {
num = (num + other.num) % mod;
return *this;
}
constexpr Modulo &operator-=(Modulo other) {
num = (num + mod - other.num) % mod;
return *this;
}
constexpr Modulo &operator*=(Modulo other) {
long long n = ((long long)num) * ((long long)other.num);
num = n % mod;
return *this;
}
constexpr Modulo &operator/=(Modulo other) {
*this *= other.inverse();
return *this;
}
constexpr static Modulo pow(Modulo a, int n, Modulo res) {
if (n == 0) { return res; }
return pow(a*a, n/2, (n&1)?(res*a):res);
}
constexpr Modulo inverse() const {
return pow(*this, mod-2, Modulo(1));
}
private:
int num;
};
template<int mod>
constexpr Modulo<mod> operator+(Modulo<mod> a, Modulo<mod> b) {
a += b;
return a;
}
template<int mod>
constexpr Modulo<mod> operator-(Modulo<mod> a, Modulo<mod> b) {
a -= b;
return a;
}
template<int mod>
constexpr Modulo<mod> operator*(Modulo<mod> a, Modulo<mod> b) {
a *= b;
return a;
}
template<int mod>
constexpr Modulo<mod> pow(Modulo<mod> a, int n) {
return Modulo<mod>::pow(a, n, 1);
}
template<int mod>
constexpr Modulo<mod> operator/(Modulo<mod> a, Modulo<mod> b) {
a /= b;
return a;
}
template<int mod, int size>
struct Factorial {
using Mod = Modulo<mod>;
Mod fact[size];
constexpr Factorial(): fact() {
fact[0] = 1;
for (int i = 1; i < size; ++i) {
fact[i] = Mod(i) * fact[i-1];
}
}
Mod comb(int n, int k) const {
assert(k <= n && n < size);
return fact[n] / (fact[k]*fact[n-k]);
}
};
constexpr int mod = 1e9 + 7;
constexpr int FMAX = 1000;
using Mod = Modulo<mod>;
constexpr auto fact = Factorial<mod, FMAX>();
Mod cases(int x, int y, int d, int l) {
if (d+l > x*y || x <= 0 || y <= 0) { return 0; }
int const o = x*y - d - l;
return fact.fact[x*y] / (fact.fact[d]*fact.fact[l]*fact.fact[o]);
}
Mod solve(int r, int c, int x, int y, int d, int l) {
Mod ans = cases(x, y, d, l);
ans -= (cases(x-1,y,d,l)+cases(x,y-1,d,l)) * Mod(2);
ans += Mod(4)*cases(x-1,y-1,d,l) + cases(x,y-2,d,l) + cases(x-2,y,d,l);
ans -= (cases(x-2,y-1,d,l)+cases(x-1,y-2,d,l)) * Mod(2);
ans += cases(x-2,y-2,d,l);
ans *= Mod(r+1-x);
ans *= Mod(c+1-y);
return ans;
}
int main() {
int R, C, X, Y, D, L;
cin >> R >> C >> X >> Y >> D >> L;
cout << solve(R, C, X, Y, D, L).data() << endl;
return 0;
}