#include #include using namespace std; using namespace atcoder; using mint = modint998244353; // using mint = double; using ll = long long; mint mpow(mint a, ll n) { mint ret = 1; while (n) { if (n & 1) ret *= a; n >>= 1; a = a * a; } return ret; } int main () { ll H, W; ll N, K; cin >> H >> W >> N >> K; if (H > W) swap(H, W); mint h = H - K + 1, w = W - K + 1; if (H < 2 * K - 1) { if (W < 2 * K - 1) { // puts("A"); mint ans = 0; for (ll i = 0; i < H; i ++) { for (ll j = 0; j < W; j ++) { ll dh = (min(i, H - K) - max(0ll, i - K + 1)) + 1; ll dw = (min(j, W - K) - max(0ll, j - K + 1)) + 1; mint p = dh * dw; p /= h * w; ans += 1 - mpow(1 - p, N); } } cout << ans.val() << endl; // cout << setprecision(5) << ans << endl; } else { // puts("B"); mint ans = 0; for (ll i = 0; i < H; i ++) { ll dh = min(i, H - K) - max(0ll, i - K + 1) + 1; for (ll j = 0; j < K - 1; j ++) { ll dw = min(j, W - K) - max(0ll, j - K + 1) + 1; mint p = dh * dw; p /= h * w; ans += 1 - mpow(1 - p, N); } ll wn = W - 2 * (K - 1); mint p_ = dh * (ll)(K); p_ /= h * w; ans += (1 - mpow(1 - p_, N)) * wn; for (ll j = W - K + 1; j < W; j ++) { ll dw = min(j, W - K) - max(0ll, j - K + 1) + 1; mint p = dh * dw; p /= h * w; ans += 1 - mpow(1 - p, N); } } cout << ans.val() << endl; // cout << setprecision(5) << ans << endl; } } else { // puts("C"); mint ans = 0; for (ll i = 0; i < K - 1; i ++) { for (ll j = 0; j < K - 1; j ++) { ll dh = i + 1, dw = j + 1; mint p = dh * dw; p /= h * w; mint p2 = 1 - mpow(1 - p, N); ans += 4 * p2; } } for (ll i = 0; i < K - 1; i ++) { ll dh = i + 1, dw = K; mint p = dh * dw; p /= h * w; mint p2 = 1 - mpow(1 - p, N); ans += p2 * 2 * (W - 2 * (K - 1)); } for (ll j = 0; j < K - 1; j ++) { ll dh = K, dw = j + 1; mint p = dh * dw; p /= h * w; mint p2 = 1 - mpow(1 - p, N); ans += p2 * 2 * (H - 2 * (K - 1)); } mint p = K * K; p /= h * w; mint p2 = 1 - mpow(1 - p, N); ans += p2 * (H - 2 * (K - 1)) * (W - 2 * (K - 1)); cout << ans.val() << endl; // cout << setprecision(5) << ans << endl; } }