#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)1503;
const int MAXM = (int)1e5 + 7;
const int infint = (int)1e8 + 3;
const int MOD = (int)1e9 + 7;
const long long inf = (long long)1e18;
int n, m, a, b, p, fact[MAXM], facrev[MAXM], P[MAXN], partP[MAXN],
    dp[MAXN][MAXN], part[MAXN][MAXN], k, save[MAXN];
int add(int a, int b) {
  int c = (a + b);
  if (c < 0) c += MOD;
  if (c >= MOD) c -= MOD;
  return c;
}
int mul(int a, int b) {
  int c = 1LL * a * b % MOD;
  return c;
}
int pwr(int a, int b) {
  if (b < 0) return 0;
  if (b == 0) return 1;
  if (b == 1) return a % MOD;
  int c = pwr(a, b / 2);
  c = mul(c, c);
  if (b % 2) c = mul(c, a);
  return c;
}
int inv(int p) { return pwr(p, MOD - 2); }
int C(int n, int k) {
  if (k > n) return 0;
  int m = fact[n];
  m = mul(m, facrev[k]);
  m = mul(m, facrev[n - k]);
  return m;
}
int def(int n, int j) {
  int Dragon = add(part[n][m], -part[n][j - 1]);
  Dragon = add(Dragon, -part[n][m - j]);
  return Dragon;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> a >> b >> k;
  p = mul(a, inv(b));
  fact[0] = 1;
  for (int i = 1; i < MAXM; i++) fact[i] = mul(fact[i - 1], i);
  facrev[MAXN - 1] = inv(fact[MAXN - 1]);
  for (int i = MAXM - 1; i >= 0; i--) facrev[i] = inv(fact[i]);
  for (int i = 0; i <= m; i++)
    P[i] = mul(mul(C(k, i), pwr(p, i)), pwr(add(1, -p), k - i));
  partP[0] = P[0];
  for (int i = 1; i <= m; i++) partP[i] = add(partP[i - 1], P[i]);
  for (int i = 1; i <= m; i++)
    for (int j = i; j <= m; j++)
      dp[1][j] = add(dp[1][j], mul(P[i - 1], P[m - j]));
  for (int i = 1; i <= m; i++) part[1][i] = add(dp[1][i], part[1][i - 1]);
  for (int i = 2; i <= n; i++) {
    dp[i][1] = mul(mul(P[0], P[m - 1]), dp[i - 1][m]);
    save[1] = mul(P[0], dp[i - 1][m]);
    for (int j = 2; j <= m; j++) {
      int Dragon = save[j - 1];
      Dragon = add(Dragon, mul(partP[j - 2], dp[i - 1][m + 1 - j]));
      Dragon = add(Dragon, mul(P[j - 1], def(i - 1, j)));
      dp[i][j] = mul(P[m - j], Dragon);
      save[j] = Dragon;
    }
    for (int j = 1; j <= m; j++) part[i][j] = add(part[i][j - 1], dp[i][j]);
  }
  cout << part[n][m];
}
