n,v,sy,sx = map(int,input().split()) b = [list(map(int,input().split())) for _ in range(n)] sx -= 1;sy -= 1 def dijkstra(x,y,flag): d = [[-1]*n for _ in range(n)] d[x][y] = 0 from heapq import heappush, heappop q = [(0,x,y)] while q: dv,x,y = heappop(q) for nx,ny in [(x+1,y),(x-1,y),(x,y-1),(x,y+1)]: if 0 <= nx < n and 0 <= ny < n and d[nx][ny]==-1: d[nx][ny] = dv + b[nx][ny] heappush(q,(dv + b[nx][ny],nx,ny)) if flag: return v > d[-1][-1] else: return v > d[0][0] + b[sx][sy] and (v - d[0][0] - b[sx][sy])*2 > d[-1][-1] print("YES" if dijkstra(0,0,1) or (sx and dijkstra(sx,sy,0)) else "NO")