import sys # sys.setrecursionlimit(200005) int1 = lambda x: int(x)-1 pDB = lambda *x: print(*x, end="\n", file=sys.stderr) p2D = lambda x: print(*x, sep="\n", end="\n\n", file=sys.stderr) def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def LI1(): return list(map(int1, sys.stdin.readline().split())) def LLI1(rows_number): return [LI1() for _ in range(rows_number)] def SI(): return sys.stdin.readline().rstrip() # dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] dij = [(0, 1), (-1, 0), (0, -1), (1, 0), (1, 1), (1, -1), (-1, 1), (-1, -1)] inf = (1 << 63)-1 # inf = (1 << 31)-1 # md = 10**9+7 md = 998244353 class Bit: def __init__(self, op, e, n): self.op = op self.e = e self.n = n+1 self.table = [e() for _ in range(self.n)] def update(self, i, x): i += 1 while i < self.n: self.table[i] = self.op(self.table[i], x) i += i & -i # [0,i] def prod(self, i): i += 1 res = self.e() while i > 0: res = self.op(res, self.table[i]) i -= i & -i return res h, w, n, p = LI() xy = LLI1(n) xy.sort() bit = Bit(max, int, w) for x, y in xy: now = bit.prod(y)+1 bit.update(y, now) c = bit.prod(w-1) m = h+w-3 p = pow(p, md-2, md) ans = 1-pow(1-p, m-c, md)*pow(1-2*p, c, md)%md print(ans%md)