import heapq def aa(i,j): global n hq=[];heapq.heappush(hq,(l[i][j],i,j)) res=[[1<<60]*n for i in range(n)];res[i][j]=l[i][j] while hq: q,w,e=heapq.heappop(hq) if res[w][e]q+l[i][j]: res[i][j]=q+l[i][j] heapq.heappush(hq,(res[i][j],i,j)) return res n,v,ox,oy=map(int,input().split());ox-=1;oy-=1 l=[list(map(int,input().split())) for i in range(n)] x=aa(0,0);y=aa(n-1,n-1) ans="NO" if x[n-1][n-1]=0 and (v-x[ox][oy])*2+l[ox][oy]>y[ox][oy]): ans="YES" print(ans)