#include using namespace std; vector dx = {1, 0, -1, 0}; vector dy = {0, 1, 0, -1}; int main(){ int H, W, Y, X; cin >> H >> W >> Y >> X; Y--; X--; vector> A(H, vector(W)); for (int i = 0; i < H; i++){ for (int j = 0; j < W; j++){ cin >> A[i][j]; } } long long C = A[Y][X]; vector> used(H, vector(W, false)); used[Y][X] = true; priority_queue, vector>, greater>> pq; for (int i = 0; i < 4; i++){ int x = Y + dx[i]; int y = X + dy[i]; if (0 <= x && x < H && 0 <= y && y < W){ pq.push(make_tuple(A[x][y], x, y)); } } bool ok = true; while (!pq.empty()){ long long P = get<0>(pq.top()); int x = get<1>(pq.top()); int y = get<2>(pq.top()); pq.pop(); if (!used[x][y]){ used[x][y] = true; if (P >= C){ ok = false; } else { C += P; for (int i = 0; i < 4; i++){ int x2 = x + dx[i]; int y2 = y + dy[i]; if (0 <= x2 && x2 < H && 0 <= y2 && y2 < W){ if (!used[x2][y2]){ pq.push(make_tuple(A[x2][y2], x2, y2)); } } } } } } if (ok){ cout << "Yes" << endl; } else { cout << "No" << endl; } }