#include #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)n;++i) #define each(a,b) for(auto (a): (b)) #define all(v) (v).begin(),(v).end() #define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end()) #define fi first #define se second #define pb push_back #define show(x) cout<<#x<<" = "<<(x)<P; const int MAX_N = 205; const int dx[] = {1,0,0,-1}; const int dy[] = {0,1,-1,0}; int cost[MAX_N][MAX_N]; int hp[MAX_N][MAX_N][2]; struct state { int a,b,c; }; int main() { cin.tie(0); ios::sync_with_stdio(false); int n,h,u,v; cin >> n >> h >> v >> u; u--,v--; rep(i,n){ rep(j,n){ cin >> cost[i][j]; } } rep(i,n){ rep(j,n){ rep(k,2){ hp[i][j][k] = 0; } } } hp[0][0][0] = h; queue que; que.push((state){0,0,0}); while(!que.empty()){ state s = que.front(); que.pop(); rep(i,4){ int nx = s.a + dx[i],ny = s.b + dy[i]; if(0 <= nx && nx < n && 0 <= ny && ny < n){ if(nx == u && ny == v && s.c == 0){ if(2*(hp[s.a][s.b][s.c] - cost[nx][ny]) > hp[nx][ny][1]){ hp[nx][ny][1] = 2*(hp[s.a][s.b][s.c] - cost[nx][ny]); que.push((state){nx,ny,1}); } }else{ if(hp[s.a][s.b][s.c] - cost[nx][ny] > hp[nx][ny][s.c]){ hp[nx][ny][s.c] = hp[s.a][s.b][s.c] - cost[nx][ny]; que.push((state){nx,ny,s.c}); } } } } } if(max(hp[n-1][n-1][0],hp[n-1][n-1][1]) > 0){ cout << "YES\n"; }else{ cout << "NO\n"; } return 0; }