#include <bits/stdc++.h>
using namespace std;
int get() {
  char ch;
  while (ch = getchar(), (ch < '0' || ch > '9') && ch != '-')
    ;
  if (ch == '-') {
    int s = 0;
    while (ch = getchar(), ch >= '0' && ch <= '9') s = s * 10 + ch - '0';
    return -s;
  }
  int s = ch - '0';
  while (ch = getchar(), ch >= '0' && ch <= '9') s = s * 10 + ch - '0';
  return s;
}
const int N = 1505;
const int mo = 1e9 + 7;
long long quickmi(long long x, long long tim) {
  long long ret = 1;
  for (; tim; tim /= 2, x = x * x % mo)
    if (tim & 1) ret = ret * x % mo;
  return ret;
}
long long add(long long x, long long y) {
  return x + y >= mo ? x + y - mo : x + y;
}
long long dec(long long x, long long y) { return x < y ? x - y + mo : x - y; }
int n, m, k;
long long A, B, p, q;
long long choose[N];
long long f[N][N][2], g[N][N];
long long val[N], pre[N];
long long suf0[N], pre1[N], suf1[N], pv1[N], pv2[N];
int main() {
  n = get();
  m = get();
  A = get();
  B = get();
  k = get();
  p = A * quickmi(B, mo - 2) % mo;
  q = (mo + 1 - p) % mo;
  choose[0] = 1;
  for (int i = 1; i <= m; i++)
    choose[i] = choose[i - 1] * quickmi(i, mo - 2) % mo * (k - i + 1) % mo;
  for (int i = 0; i <= m; i++)
    val[i] = choose[i] * quickmi(p, i) % mo * quickmi(q, k - i) % mo;
  pre[0] = val[0];
  for (int i = 1; i <= m; i++) pre[i] = add(pre[i - 1], val[i]);
  if (n == 1) {
    long long ans = 0;
    for (int l = 1; l <= m; l++)
      for (int r = l; r <= m; r++) ans = add(ans, val[l - 1] * val[m - r] % mo);
    cout << ans << endl;
    return 0;
  }
  for (int l = 1; l <= m; l++) f[1][l][1] = val[l - 1];
  for (int i = 1; i <= n - 1; i++) {
    for (int x = m; x >= 1; x--) {
      suf0[x] = add(suf0[x + 1], f[i][x][0] * pre[m - x] % mo);
      suf1[x] =
          add(suf1[x + 1], f[i][x][1] * pre[m - x] % mo * pre[m - x] % mo);
    }
    for (int x = 1; x <= m; x++) {
      pre1[x] = add(pre1[x - 1], f[i][x][1]);
      pv1[x] = add(pv1[x - 1], f[i][x][0] * pre[x - 1] % mo);
      pv2[x] = add(pv2[x - 1], f[i][x][1] * pre[m - x] % mo * pre[x - 1] % mo);
    }
    for (int y = 1; y <= m; y++)
      f[i + 1][y][0] = add(f[i + 1][y][0], suf0[y] * val[y - 1] % mo);
    for (int y = 1; y <= m; y++)
      f[i + 1][y][1] =
          add(f[i + 1][y][1], pre1[y - 1] * val[y - 1] % mo * pre[m - y] % mo);
    for (int y = 1; y <= m; y++)
      f[i + 1][y][0] = add(f[i + 1][y][0], suf1[y] * val[y - 1] % mo);
    if (i + 1 < n) {
      for (int y = 2; y <= m; y++)
        f[i + 2][y][1] =
            add(f[i + 2][y][1], suf0[y] * pre[y - 2] % mo * val[y - 1] % mo);
      for (int y = 2; y <= m; y++)
        f[i + 2][y][1] =
            add(f[i + 2][y][1], pv1[y - 1] * pre[m - y] % mo * val[y - 1] % mo);
      for (int y = 2; y <= m; y++)
        f[i + 2][y][1] =
            add(f[i + 2][y][1], suf1[y] * pre[y - 2] % mo * val[y - 1] % mo);
      for (int y = 2; y <= m; y++)
        f[i + 2][y][1] =
            add(f[i + 2][y][1], pv2[y - 1] * pre[m - y] % mo * val[y - 1] % mo);
    }
  }
  long long ans = 0;
  for (int x = 1; x <= m; x++) {
    ans = add(ans, f[n][x][0]);
    ans = add(ans, f[n][x][1] * pre[m - x] % mo);
  }
  cout << ans << endl;
  return 0;
}
