import sys import io, os input = io.BytesIO(os.read(0,os.fstat(0).st_size)).readline n, h, ox, oy = map(int, input().split()) ox, oy = ox-1, oy-1 L = [list(map(int, input().split())) for i in range(n)] dp = [[0]*2 for i in range(n*n)] dp[0][0] = h import heapq q = [] q.append((-h, 0, 0)) heapq.heapify(q) while q: cur_h, v, k = heapq.heappop(q) cur_h *= (-1) x, y = divmod(v, n) for dx, dy in (-1, 0), (1, 0), (0, -1), (0, 1): nx, ny = x+dx, y+dy if 0 <= nx < n and 0 <= ny < n: nv = nx*n+ny if k == 0: if dp[nv][k] < cur_h-L[nx][ny]: dp[nv][k] = cur_h-L[nx][ny] heapq.heappush(q, (-dp[nv][k], nv, k)) if nx == ox and ny == oy: if dp[nv][k+1] < 2*(cur_h-L[nx][ny]): dp[nv][k+1] = 2*(cur_h-L[nx][ny]) heapq.heappush(q, (-dp[nv][k+1], nv, k+1)) else: if dp[nv][k] < cur_h-L[nx][ny]: dp[nv][k] = cur_h-L[nx][ny] heapq.heappush(q, (-dp[nv][k], nv, k)) t = (n-1)*n+n-1 if dp[t][0] > 0 or dp[t][1] > 0: print('YES') else: print('NO')