#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
using namespace std;
typedef long long ll;
int INF = (1LL << 30) - 1;
int MOD = 1e9+7;
int N,V,X,Y;
int table[200][200];
int rest[200][200];
void dfs(int y, int x, int v){
    if(v <= 0)return;
    int dx[] = {-1, 0, 1, 0}, dy[] = {0, -1, 0, 1};
    rep(i,0,4){
        int nx = x + dx[i];
        int ny = y + dy[i];
        if(nx < 0 || nx >= N || ny < 0 || ny >= N)continue;
        if(rest[ny][nx] < v - table[ny][nx]){
            rest[ny][nx] = v - table[ny][nx];
            dfs(ny, nx, rest[ny][nx]);
        }
    }
}
main(){
    cin >> N >> V >> X >> Y;
    
    rep(i,0,N)rep(j,0,N){
        cin >> table[i][j];
        rest[i][j] = 0;
    }
    dfs(0, 0, V);
    //if(X != 0 || Y != 0)cout << rest[Y-1][X-1] << endl;
    if(X != 0 || Y != 0){
        dfs(Y-1, X-1, rest[Y-1][X-1] * 2);
    }
    //if(X != 0 || Y != 0)cout << rest[Y-1][X-1] << endl;
    string ans[] = {"NO", "YES"};
    cout << ans[rest[N-1][N-1] > 0] << endl;
}