#include <bits/stdc++.h>
const int N = 203300, MO = 1000000007;
int f[N + N], sum[N + N], n, m, l, r, a, b, cur;
int main() {
  int i, j;
  scanf("%d%d%d%d", &a, &b, &m, &n);
  f[N + a - b] = 1;
  m *= 2;
  l = N + a - b - m * n;
  r = N + a - b + m * n;
  for (j = l; j <= r + m; j++) sum[j] = (sum[j - 1] + f[j]) % MO;
  for (i = 1; i <= n; i++) {
    cur = 0;
    for (j = -m; j <= m; j++)
      cur = (cur + (long long)(m + 1 - (j > 0 ? j : -j)) * f[l + j] % MO) % MO;
    for (j = l; j <= r; j++) {
      f[j] = cur;
      cur = (cur - (sum[j] + MO - sum[j - m - 1]) % MO + MO) % MO;
      cur = (cur + (sum[j + m + 1] + MO - sum[j]) % MO) % MO;
    }
    for (j = l; j <= r + m; j++) sum[j] = (sum[j - 1] + f[j]) % MO;
  }
  int ans = 0;
  for (i = N + 1; i <= r; i++) ans = (ans + f[i]) % MO;
  printf("%d\n", ans);
  return 0;
}
