mod = 10 ** 9 + 7 class counting: def __init__(self, n): self.n = n self.fa = [1] * (self.n + 1) self.fi = [1] * (self.n + 1) for i in range(1, self.n + 1): self.fa[i] = self.fa[i - 1] * i % mod self.fi[-1] = pow(self.fa[-1], mod - 2, mod) for i in range(self.n, 0, -1): self.fi[i - 1] = self.fi[i] * i % mod def comb(self, n, r): if n < r:return 0 if n < 0 or r < 0:return 0 return self.fa[n] * self.fi[r] % mod * self.fi[n - r] % mod def per(self, n, r): if n < r:return 0 if n < 0 or r < 0:return 0 return self.fa[n] * self.fi[n - r] % mod a, b = map(int, input().split()) n, k = map(int, input().split()) C = counting(n) print((a * C.comb(n - 1, k - 1) + b * C.comb(n - 1, k - 2)) % mod) ans = 0 for i in range(n + 1): ans += pow(a * C.comb(n - 1, i) + b * C.comb(n - 1, i - 1), 2, mod) ans %= mod print(ans)