import heapq

N,V,cx,cy=map(int,input().split())
MAP=[list(map(int,input().split())) for i in range(N)]

cx-=1
cy-=1

DP1=[[0]*N for i in range(N)]
DP2=[[0]*N for i in range(N)]

DP1[0][0]=V

Q=[(-V,0,0,1)]

while Q:
    hp,x,y,c=heapq.heappop(Q)
    hp=-hp

    if c==1:
        for z,w in [(x+1,y),(x-1,y),(x,y+1),(x,y-1)]:
            if 0<=z<N and 0<=w<N:
                if DP1[z][w]<hp-MAP[z][w]:
                    DP1[z][w]=hp-MAP[z][w]
                    heapq.heappush(Q,(-DP1[z][w],z,w,1))

                    if z==cy and w==cx and DP2[z][w]<(hp-MAP[z][w])*2:
                        DP2[z][w]=(hp-MAP[z][w])*2
                        heapq.heappush(Q,(-DP2[z][w],z,w,2))

    else:
        for z,w in [(x+1,y),(x-1,y),(x,y+1),(x,y-1)]:
            if 0<=z<N and 0<=w<N:
                if DP2[z][w]<hp-MAP[z][w]:
                    DP2[z][w]=hp-MAP[z][w]
                    heapq.heappush(Q,(-DP2[z][w],z,w,2))

if DP1[N-1][N-1]>0 or DP2[N-1][N-1]>0:
    print("YES")
else:
    print("NO")