#include<cstdio>
#include<iostream>
using namespace std;
// #define TDS_ACM_LOCAL
#define ll long long
const int mod=1e9+7;
ll n, m, k, a, b;
ll quick_pow(ll a, ll b)
{
ll res = 1;
while (b)
{
if (b & 1)
res = res * a % mod;
a = a * a % mod;
b >>= 1;
}
return res;
}
void solve(){
cin>>n>>m>>k>>a>>b;
ll x=(((((b*n)%mod -(a*n)%mod -(a*m)%mod)+mod)%mod *quick_pow(n+m, k))%mod +((a*(n+m)%mod)%mod *quick_pow(n+m+1, k))%mod)%mod;
ll y=(b*quick_pow(n+m+1, k))%mod;
y=quick_pow(y,mod-2);
cout<<x*y%mod<<endl;
return ;
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
#ifdef TDS_ACM_LOCAL
freopen("D:\\VS code\\.vscode\\testall\\in.txt", "r", stdin);
freopen("D:\\VS code\\.vscode\\testall\\out.txt", "w", stdout);
#endif
solve();
return 0;
}
Comments NOTHING