#include <bits/stdc++.h>
using namespace std;
long long n, m, a, b, K;
long long P[100010], sp[100010], fac[100010], ifac[100010];
long long sl[1510][1510], f[1510][1510];
long long qpow(long long x, long long y) {
  long long ret = 1;
  while (y) {
    if (y & 1) ret = ret * x % 1000000007;
    x = x * x % 1000000007;
    y >>= 1;
  }
  return ret;
}
long long C(long long x, long long y) {
  return fac[x] * ifac[y] % 1000000007 * ifac[x - y] % 1000000007;
}
void init() {
  fac[0] = 1;
  for (long long i = 1; i <= K; i++) fac[i] = fac[i - 1] * i % 1000000007;
  ifac[K] = qpow(fac[K], 1000000007 - 2);
  for (long long i = K; i; i--) ifac[i - 1] = ifac[i] * i % 1000000007;
  for (long long i = 0; i <= K; i++)
    P[i] = C(K, i) * qpow(a, i) % 1000000007 *
           qpow((1 - a + 1000000007) % 1000000007, K - i) % 1000000007;
  sp[0] = P[0];
  for (long long i = 1; i <= m; i++) sp[i] = (sp[i - 1] + P[i]) % 1000000007;
}
signed main() {
  scanf("%lld%lld%lld%lld%lld", &n, &m, &a, &b, &K);
  a = a * qpow(b, 1000000007 - 2) % 1000000007;
  init();
  sl[0][m] = f[0][m] = 1;
  for (long long i = 1; i <= n; i++) {
    long long now = 0;
    for (long long j = 1; j <= m; j++) {
      f[i][j] =
          (((sl[i - 1][m] - sl[i - 1][m - j]) * sp[j - 1] % 1000000007 - now) %
               1000000007 +
           1000000007) %
          1000000007 * P[m - j] % 1000000007;
      sl[i][j] = (sl[i][j - 1] + f[i][j]) % 1000000007;
      now = (now + P[j] * sl[i - 1][j] % 1000000007) % 1000000007;
    }
  }
  printf("%lld\n", (sl[n][m] % 1000000007 + 1000000007) % 1000000007);
  return 0;
}
