#include<bits/stdc++.h>
#define rint register int
#define rep(i,a,b) for (rint i=(a),_E=(b); i<=_E; ++i)
#define per(i,a,b) for (rint i=(a),_E=(b); i>=_E; --i)
#define REP(i,n) for (rint i=0,_E=(n); i<_E; ++i)
#define pb push_back
#define cmin(x,y) (y<x?x=y:0)
#define cmax(x,y) (y>x?x=y:0)
using namespace std;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

const int N = 10005;
const int mod = 1000000007;
int n, a, b, c, n1, n2, n3, n4, K, res, now;
int fac[N], rev[N];

inline int power(int x, int p) {
	int res = 1;
	while (p) {
		if (p & 1) res = 1ll * x * res % mod;
		x = 1ll * x * x % mod; p >>= 1;
	}
	return res;
}

inline int C(int n, int m) {
	if (m < 0 || m > n) return 0;
	return 1ll * fac[n] * rev[m] % mod * rev[n-m] % mod;
}

//将n划分为m份，可以为空
inline int calc(int n, int m) {
	if (!n && !m) return 1;
	return C(n + m - 1, m - 1);
}

int main() {
	scanf("%d%d%d%d", &n, &a, &b, &c);
	if (b & 1) return puts("0"), 0;
	fac[0] = rev[0] = 1;
	rep (i, 1, 10000) {
		fac[i] = 1ll * i * fac[i-1] % mod;
		rev[i] = power(fac[i], mod - 2);
	}
	rep (x, 0, min(a, c)) rep (y, 0, (c - x) / 3) {
		n1 = b / 2, n2 = y, n3 = a - x, n4 = x, K = c - x - 3 * y;
		if (n1 < 0 || n2 < 0 || n3 < 0 || n4 < 0 || K < 0) continue;
		now = 1ll * fac[n1 + n2 + n3 + n4] * calc(K, n1) % mod;
		now = 1ll * now * rev[n1] % mod * rev[n2] % mod;
		now = 1ll * now * rev[n3] % mod * rev[n4] % mod;
		res = (res + now) % mod;
	}
	printf("%d\n", res);
	return 0;
}