#include using namespace std; const int64_t dy[4] = {1, 0, -1, 0}; const int64_t dx[4] = {0, 1, 0, -1}; int main() { int64_t H, W, Y, X; cin >> H >> W >> Y >> X; Y--; X--; vector> A(H, vector(W)); for(int64_t i = 0; i < H; i++) for(int64_t j = 0; j < W; j++) cin >> A[i][j]; vector> C(H, vector(W)); int64_t P = A[Y][X]; C[Y][X] = true; priority_queue, vector>, greater>> pq; int64_t y, x; for(int dir = 0; dir < 4; dir++) { y = Y + dy[dir]; x = X + dx[dir]; if(y < 0 || y >= H || x < 0 || x >= W) continue; C[y][x] = true; pq.push({A[y][x], y * W + x}); } while(!pq.empty()) { pair p = pq.top(); y = p.second / W; x = p.second % W; pq.pop(); if(P <= p.first) { cout << "No" << endl; return 0; } P += p.first; for(int dir = 0; dir < 4; dir++) { int64_t ny = y + dy[dir]; int64_t nx = x + dx[dir]; if(ny < 0 || ny >= H || nx < 0 || nx >= W) continue; if(C[ny][nx]) continue; C[ny][nx] = true; pq.push({A[ny][nx], ny * W + nx}); } } cout << "Yes" << endl; return 0; }