R=range H,W,K,M=map(int,input().split()) HW=H*W p=1 << HW found=[0]*p count=[0]*(HW+1) dfs=[] for h in R(H): for w in R(W): i=h*W+w s=1<>d)&1for d in R(HW)) count[c]+=1<<(HW-c-sum((bs>>d)&1for d in R(HW))) for i in R(HW): if(bs>>i)&1<1:continue h,w=i//W,i%W t=s|(1<>j)&1<1:bt|=(1<