from collections import deque n,v,x,y = map(int,input().split()) L = [list(map(int,input().split())) for i in range(n)] inf = 10**10 def bfs(sx,sy): dis = [[inf]*n for i in range(n)] dis[sx][sy] = 0 q = deque([[sx,sy]]) while q: nx,ny = q.popleft() for (i,j) in ((1,0),(-1,0),(0,1),(0,-1)): nnx = nx+i nny = ny+j if 0 <= nnx < n and 0 <= nny < n and dis[nnx][nny] > dis[nx][ny]+L[nnx][nny]: dis[nnx][nny] = dis[nx][ny]+L[nnx][nny] q.append([nnx,nny]) return dis dis0 = bfs(0,0) diso = bfs(x-1,y-1) ans = "NO" if dis0[-1][-1] < v: ans = "YES" if diso[-1][-1] < (v-dis0[x-1][y-1])*2: ans = "YES" print(ans)