class BIT: def __init__(self, n): self.n = n; self.k = [0]*(n+1) def u(self, i, x): while i <= self.n: self.k[i] = max(self.k[i], x); i += i&-i def m(self, i): t = 0 while i > 0: t = max(t, self.k[i]); i -= i&-i return t h,w,n,p = map(int,input().split()) xy = [tuple(map(int,input().split())) for _ in range(n)] m = 998244353; bit = BIT(w+1) for x,y in sorted(xy): bit.u(y,bit.m(y)+1) c = bit.m(w) print((1-pow(p-1,h+w-3-c,m)*pow(p-2,c,m)*pow(pow(p,h+w-3,m),m-2,m))%m)