#include using namespace std; int main() { long long a, b; int n, k; cin >> a >> b >> n >> k; const long long MOD = 1000000000 + 7; a %= MOD; b %= MOD; auto power = [&]( long long x, long long nn ) -> long long { long long res = 1; while( nn > 0 ) { if( nn % 2 ) res = res * x % MOD; x = x * x % MOD; nn /= 2; } return res; }; vector fac( n ); vector ifac( n ); fac[0] = 1; ifac[0] = power( 1, MOD - 2 ); for( int i = 1; i < n; i++ ) { fac[i] = fac[i - 1] * i % MOD; ifac[i] = power( fac[i], MOD - 2 ); } vector na( n + 1 ); na[0] = 1; na[n] = 0; vector nb( n + 1 ); nb[0] = 0; nb[n] = 1; for( int i = 1; i < n; i++ ) { int nn = n - 1; na[i] = fac[nn] * ifac[i] % MOD * ifac[nn - i] % MOD; nb[n - i] = na[i]; } long long ans = (na[k - 1] * a % MOD + nb[k - 1] * b % MOD) % MOD; cout << ans << endl; ans = 0; for( int i = 0; i < n + 1; i++ ) { long long x = (na[i] * a % MOD + nb[i] * b % MOD) % MOD; ans += x * x % MOD; ans %= MOD; } cout << ans << endl; }