Gx,Gy,N,F=map(int,input().split()) C=[list(map(int,input().split())) for i in range(N)] DP=[[1<<60]*(Gy+1) for i in range(Gx+1)] DP[0][0]=0 for i in range(Gx+1): for j in range(Gy+1): if i+1