import sys input = sys.stdin.readline import heapq H,W,x,y=map(int,input().split()) A=[list(map(int,input().split())) for i in range(H)] x-=1 y-=1 NOW=A[x][y] B=0 USE=[[0]*W for i in range(H)] USE[0][0]=1 Q=[] for z,w in [(x+1,y),(x-1,y),(x,y+1),(x,y-1)]: if 0<=z