#include #include #define rep(i, a, b) for (ll i = (ll)(a); i < (ll)(b); i++) using namespace std; using namespace atcoder; typedef long long ll; using mint = modint998244353; int main() { int p1, p2, q1, q2, t; cin >> p1 >> p2 >> q1 >> q2 >> t; mint p = p1, q = q1; p /= p2, q /= q2; vector > dp(t + 1, vector(t + 1)); dp[0][0] = 1; rep(i, 0, t) { rep(j, 0, t) { dp[i + 1][0] += (mint)p * dp[i][j]; dp[i + 1][j + 1] += (mint)q.pow(j + 1) * dp[i][j]; } } mint ans = 0; rep(i, 0, t + 1) ans += dp[t][i]; cout << ans.val() << endl; }