from collections import deque def bfs(H, W, L, sx, sy, gx, gy, V, Ox, Oy): def _bfs(): while Queue: x,y = Queue.popleft() for i in range(len(dx)): nx,my = x + dx[i], y + dy[i] if nx < 0 or H <= nx or my < 0 or W <= my: continue if Cost[nx][my] < Cost[x][y] - L[nx][my]: Cost[nx][my] = Cost[x][y] - L[nx][my] Queue.append((nx, my)) INF = -10 dx = [0, 0, -1, 1] dy = [-1, 1, 0, 0] Cost = [[INF] * W for _ in range(H)] Cost[sx][sy] = V Queue = deque() Queue.append((sx, sy)) _bfs() Cost[Ox][Oy] *= 2 Queue.append((Ox, Oy)) _bfs() return Cost[gx][gy] N,V,Ox,Oy = map(int,input().split()) L = [list(map(int,input().split())) for _ in range(N)] if bfs(N, N, L, 0, 0, N-1, N-1, V, Ox-1, Oy-1) > 0: print('YES') else: print('NO')