#include using namespace std; #include using mint = atcoder::modint998244353; int op(int l, int r) { return std::max(l, r); } int e() { return 0; } int main() { int H, W, N, P; cin >> H >> W >> N >> P; vector> xy(N); for (auto &[x, y] : xy) cin >> x >> y, --y; sort(xy.begin(), xy.end()); atcoder::segtree tree(W); for (auto [_, y] : xy) tree.set(y, tree.prod(0, y + 1) + 1); const int k = tree.all_prod(); mint p = mint(1) / P; cout << (1 - (1 - p).pow(H + W - 3 - k) * (1 - p * 2).pow(k)).val() << endl; }