#include <bits/stdc++.h>
inline int getint() {
  register char ch;
  while (!isdigit(ch = getchar()))
    ;
  register int x = ch ^ '0';
  while (isdigit(ch = getchar())) x = (((x << 2) + x) << 1) + (ch ^ '0');
  return x;
}
const long long mod = 1e9 + 7;
const int N = 1501, M = 1502, K = 100001;
void exgcd(const long long &a, const long long &b, long long &x, long long &y) {
  if (!b) {
    x = 1;
    y = 0;
    return;
  }
  exgcd(b, a % b, y, x);
  y -= a / b * x;
}
inline long long inv(const long long &x) {
  long long tmp, ret;
  exgcd(x, mod, ret, tmp);
  return (ret + mod) % mod;
}
long long f[2][M];
long long p[K], q[K];
long long fact[K], tcaf[K];
int k;
inline long long calc(const int &x) {
  return fact[k] * tcaf[k - x] % mod * tcaf[x] % mod * p[x] % mod * q[k - x] %
         mod;
}
signed main() {
  int n = getint(), m = getint();
  long long a = getint(), b = getint();
  k = getint();
  fact[0] = 1;
  for (register int i = 1; i <= k; i++) {
    fact[i] = fact[i - 1] * i % mod;
  }
  tcaf[k] = inv(fact[k]);
  for (register int i = k - 1; ~i; i--) {
    tcaf[i] = tcaf[i + 1] * (i + 1) % mod;
  }
  p[0] = q[0] = 1;
  p[1] = a * inv(b) % mod;
  q[1] = (b - a) * inv(b) % mod;
  for (register int i = 2; i <= k; i++) {
    p[i] = p[i - 1] * p[1] % mod;
    q[i] = q[i - 1] * q[1] % mod;
  }
  f[0][m] = 1;
  for (register int i = 1; i <= n; i++) {
    long long s1 = 0, s2 = 0;
    for (register int j = 0; j <= m; j++) {
      f[i & 1][j] = (s1 * (f[!(i & 1)][m] - f[!(i & 1)][m - j]) - s2) % mod *
                    calc(m - j) % mod;
      s1 = (s1 + calc(j)) % mod;
      s2 = (s2 + f[!(i & 1)][j] * calc(j)) % mod;
    }
    for (register int j = 1; j <= m; j++) {
      f[i & 1][j] = (f[i & 1][j] + f[i & 1][j - 1]) % mod;
    }
  }
  printf("%I64d\n", (f[n & 1][m] + mod) % mod);
  return 0;
}
