#include <bits/stdc++.h>
using namespace std;
long long powr(long long a, long long b, long long mod) {
  long long x = 1 % mod;
  a %= mod;
  while (b) {
    if (b & 1) x = (x * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return x;
}
long long inv(long long a, long long mod) { return powr(a, mod - 2, mod); }
const int maxn = 1e6 + 10;
const long long mod = 1e9 + 7;
const int N = 500005;
long long fact[N], invfact[N];
long long C(int n, int k) {
  if (n < 0 || k < 0 || n < k) return 0;
  return (fact[n] * ((invfact[k] * invfact[n - k]) % mod)) % mod;
}
int main() {
  int a, b, k, t;
  scanf("%d", &(a)), scanf("%d", &(b)), scanf("%d", &(k)), scanf("%d", &(t));
  fact[0] = invfact[0] = 1;
  for (int i = 1; i < N; i++)
    fact[i] = (fact[i - 1] * i) % mod, invfact[i] = inv(fact[i], mod);
  long long ans = 0;
  for (int r = 0; r <= 2 * t; r++)
    for (int i = 0; i <= 4 * k * t; i++)
      if ((r * (2 * k + 1) + i > b - a + 2 * k * t) &&
          (r * (2 * k + 1) + i <= 4 * k * t)) {
        if (!(r & 1))
          ans = (ans + C(2 * t, r) * C(2 * t + i - 1, i)) % mod;
        else
          ans = (ans - C(2 * t, r) * C(2 * t + i - 1, i)) % mod;
      }
  ans = (ans % mod + mod) % mod;
  cout << ans;
}
