from heapq import heappush, heappop from collections import defaultdict N, V, X, Y = map(int, input().split()) X -= 1 Y -= 1 L = [list(map(int, input().split())) for _ in range(N)] minDistFromOrigin = [[float('inf')] * N for _ in range(N)] que = [(0, 0, 0)] while que: d, x, y = heappop(que) if minDistFromOrigin[x][y] <= d: continue minDistFromOrigin[x][y] = d for nx in [x - 1, x + 1]: if 0 <= nx < N: heappush(que, (d + L[y][nx], nx, y)) for ny in [y - 1, y + 1]: if 0 <= ny < N: heappush(que, (d + L[ny][x], x, ny)) if minDistFromOrigin[N - 1][N - 1] < V: print('YES') exit() if 0 <= X < N and 0 <= Y < N: minDistFromOasis = [[float('inf')] * N for _ in range(N)] que = [(0, X, Y)] while que: d, x, y = heappop(que) if minDistFromOasis[x][y] <= d: continue minDistFromOasis[x][y] = d for nx in [x - 1, x + 1]: if 0 <= nx < N: heappush(que, (d + L[y][nx], nx, y)) for ny in [y - 1, y + 1]: if 0 <= ny < N: heappush(que, (d + L[ny][x], x, ny)) life = (V - minDistFromOrigin[X][Y]) * 2 if life > minDistFromOasis[N - 1][N - 1]: print('YES') exit() print('NO')