import sys, time, random from collections import deque, Counter, defaultdict input = lambda: sys.stdin.readline().rstrip() ii = lambda: int(input()) mi = lambda: map(int, input().split()) li = lambda: list(mi()) inf = 2 ** 61 - 1 mod = 998244353 from functools import lru_cache sys.setrecursionlimit(10 ** 6) p1, p2, q1, q2, T = mi() T += 1 T *= 2 p1p2 = p1 * pow(p2, -1, mod) % mod q1q2 = q1 * pow(q2, -1, mod) % mod @lru_cache(None) def solve(t, T): if T <= t: return 1 else: if t % 2 == 0: ans = (p1p2 + (1 - p1p2)) * solve(t + 1, T) + p1p2 * solve(2, T - t) % mod else: q1q2t = pow(q1q2, t // 2, mod) ans = q1q2t * solve(t + 1, T) % mod return ans print(solve(2, T) % mod)