import heapq import sys #ダイクストラ法 N,V,ox,oy = map(int,input().split()) ox -= 1 oy -= 1 lsL = [list(map(int,input().split())) for i in range(N)] dxy =[(1,0),(0,1),(-1,0),(0,-1)] #オアシスを通らない場合 lsHP = [[-float('INF')]*(N) for i in range(N)] lsHP[0][0] = V used = [[False]*(N) for i in range(N)] h = [(-V,0,0)] heapq.heapify(h) while h: cost,x,y = heapq.heappop(h) if used[x][y]: continue used[x][y] = True for dx,dy in dxy: if 0<=x+dx 0: print('YES') sys.exit() if ox != -1 and oy != -1: #オアシスを通る場合 lsHP2 = [[-float('INF')]*(N) for i in range(N)] lsHP2[ox][oy] = lsHP[ox][oy]*2 used = [[False]*(N) for i in range(N)] h = [(-lsHP[ox][oy],ox,oy)] heapq.heapify(h) while h: cost,x,y = heapq.heappop(h) if used[x][y]: continue used[x][y] = True for dx,dy in dxy: if 0<=x+dx 0: print('YES') else: print('NO') else: print('NO')