#include <bits/stdc++.h>
int mod = 1000000007;
using namespace std;
long long sil[100001];
long long pot1[100001];
long long pot2[100001];
long long help[1501];
long long w1[1501];
long long w2[1501];
long long ww[1501];
long long pref[1501], pref2[1501];
long long pot(long long a, long long b) {
  long long wyn = 1;
  a %= mod;
  while (b > 0) {
    if (b % 2 == 1) wyn = (wyn * a) % mod;
    a = (a * a) % mod;
    b /= 2;
  }
  return wyn;
}
long long dziel(long long a, long long b) {
  return (a * pot(b, mod - 2)) % mod;
}
long long dwu(long long n, long long k) {
  return dziel(sil[n], (sil[n - k] * sil[k]) % mod);
}
int main() {
  sil[1] = 1;
  sil[0] = 1;
  for (long long i = 2; i <= 100000; i++) sil[i] = (sil[i - 1] * i) % mod;
  int n, m;
  long long a, b;
  long long p1, p2;
  int k;
  scanf("%d%d", &m, &n);
  scanf("%lld%lld", &a, &b);
  scanf("%d", &k);
  p1 = dziel(a, b);
  p2 = dziel(b - a, b);
  pot1[0] = pot2[0] = 1;
  for (int i = 1; i <= 100000; i++) {
    pot1[i] = (p1 * pot1[i - 1]) % mod;
    pot2[i] = (p2 * pot2[i - 1]) % mod;
  }
  long long wyn = 0;
  for (int i = 0; i <= min(1500, k); i++) {
    help[i] = dwu(k, i) % mod;
    help[i] = (help[i] * pot1[i]) % mod;
    help[i] = (help[i] * pot2[k - i]) % mod;
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; i + j < n; j++) {
      w1[n - i] = (w1[n - i] + help[i] * help[j]) % mod;
    }
  }
  pref[0] = help[0];
  for (int j = 1; j <= n; j++) pref[j] = (pref[j - 1] + help[j]) % mod;
  for (int i = 2; i <= m; i++) {
    for (int j = 1; j <= n; j++) {
      w1[j] = (w1[j] + w1[j - 1]);
      if (w1[j] >= mod) w1[j] -= mod;
      pref2[j] = (pref2[j - 1] + help[j] * w1[j]) % mod;
    }
    for (int j = 1; j <= n; j++) {
      w2[j] = ((w1[n] - w1[n - j]) * pref[j - 1]) % mod;
      w2[j] = (w2[j] - pref2[j - 1]);
      if (w2[j] < 0) w2[j] += mod;
      if (w2[j] < 0) w2[j] += mod;
      w2[j] = (w2[j] * help[n - j]) % mod;
    }
    for (int j = 1; j <= n; j++) w1[j] = w2[j];
  }
  for (int i = 1; i <= n; i++) wyn = (wyn + w1[i]) % mod;
  if (wyn < 0) wyn += mod;
  printf("%lld", wyn);
}
