#include<iostream>
#include<cstdio>
#define FOR(i,a,b) for(int i=a;i<=b;i++)
using namespace std;
const int N=100100,M=2020,P=1e9+7;
int n,m,x,y,K,sum,ans,s0,s1,s2,s3;
int iv[N],fc[N],vf[N],w[N],f[M][M];
int qpw(int x,int y){int z=1;for(;y;y>>=1,x=1ll*x*x%P)if(y&1) z=1ll*z*x%P;return z;}
int C(int x,int y){return 1ll*fc[x]*vf[x-y]%P*vf[y]%P;}
int main(){
scanf("%d%d%d%d%d",&n,&m,&x,&y,&K);
x=1ll*x*qpw(y,P-2)%P;
fc[0]=vf[0]=iv[1]=1;
FOR(i,2,K) iv[i]=1ll*(P-P/i)*iv[P%i]%P;
FOR(i,1,K) fc[i]=1ll*fc[i-1]*i%P,vf[i]=1ll*vf[i-1]*iv[i]%P;
FOR(i,0,K) w[i]=1ll*qpw(x,i)*qpw(P+1-x,K-i)%P*C(K,i)%P;
f[0][m]=1;
FOR(i,1,n){
s0=f[i-1][m];s1=w[0];s2=s3=0;
FOR(j,1,m){
f[i][j]=(1ll*s0*s1%P-s3+P)%P*w[m-j]%P;
(s0+=f[i-1][m-j])%=P;
(s1+=w[j])%=P;
(s2+=f[i-1][j])%=P;
(s3+=1ll*w[j]*s2%P)%=P;
}
}
FOR(i,1,m) (ans+=f[n][i])%=P;
cout<<ans<<'\n';
}/*1692611903.8041084*/
448. Find All Numbers Disappeared in an Array | 1155. Number of Dice Rolls With Target Sum |
415. Add Strings | 22. Generate Parentheses |
13. Roman to Integer | 2. Add Two Numbers |
515. Find Largest Value in Each Tree Row | 345. Reverse Vowels of a String |
628. Maximum Product of Three Numbers | 1526A - Mean Inequality |
1526B - I Hate 1111 | 1881. Maximum Value after Insertion |
237. Delete Node in a Linked List | 27. Remove Element |
39. Combination Sum | 378. Kth Smallest Element in a Sorted Matrix |
162. Find Peak Element | 1529A - Eshag Loves Big Arrays |
19. Remove Nth Node From End of List | 925. Long Pressed Name |
1051. Height Checker | 695. Max Area of Island |
402. Remove K Digits | 97. Interleaving String |
543. Diameter of Binary Tree | 124. Binary Tree Maximum Path Sum |
1465. Maximum Area of a Piece of Cake After Horizontal and Vertical Cuts | 501A - Contest |
160A- Twins | 752. Open the Lock |