#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long n, m, a, b, k, jc[100005], ny[100005], pre[1503];
long long f[1503][1503], s[1503][1503], p[1503];
inline long long ksm(long long x, long long y) {
  if (y < 0) {
    return 0;
  }
  long long ans = 1;
  for (; y; y >>= 1) {
    if (y & 1) ans = ans * x % mod;
    x = x * x % mod;
  }
  return ans;
}
inline long long C(long long n, long long m) {
  if (n < m) {
    return 0;
  }
  return jc[n] * ny[m] % mod * ny[n - m] % mod;
}
int main() {
  cin >> n >> m >> a >> b >> k;
  a = a * ksm(b, mod - 2) % mod;
  jc[0] = jc[1] = ny[0] = ny[1] = 1;
  for (int i = 2; i <= k; i++) {
    jc[i] = jc[i - 1] * i % mod, ny[i] = (mod - mod / i) * ny[mod % i] % mod;
  }
  for (int i = 2; i <= k; i++) {
    ny[i] = ny[i - 1] * ny[i] % mod;
  }
  for (int i = 1; i <= m; i++) {
    p[i] =
        ksm(a, i - 1) * ksm(1 + mod - a, k - i + 1) % mod * C(k, i - 1) % mod;
    pre[i] = (pre[i - 1] + p[i]) % mod;
  }
  f[0][m] = s[0][m] = 1;
  for (int i = 1; i <= n; i++) {
    int w = 0;
    for (int j = 1; j <= m; j++) {
      (w += p[j] * (s[i - 1][m] + mod - s[i - 1][j - 1]) % mod) %= mod;
      f[i][j] = (w + mod - s[i - 1][m - j] * pre[j] % mod) * p[m - j + 1] % mod;
      s[i][j] = (s[i][j - 1] + f[i][j]) % mod;
    }
  }
  cout << s[n][m] << endl;
  return 0;
}
